From 2449c43bdbf02a669ffa355c2273a2c99f63a616 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 6 Jan 2025 15:37:54 +0000 Subject: [PATCH] vddk: do_extents: Mark some local variables const These are never changed in the code (they are fields copied out from the *cmd struct), so mark them as const. Acked-by: Eric Blake (cherry picked from commit 24fd7df460ae31fe3f72b5100ca3dbe138bbadbe) (cherry picked from commit 0ba2e0d3c53efd49309d9e274e0cb6c2e6720cbd) --- plugins/vddk/worker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/vddk/worker.c b/plugins/vddk/worker.c index 5982fcea..bc015d16 100644 --- a/plugins/vddk/worker.c +++ b/plugins/vddk/worker.c @@ -388,9 +388,9 @@ add_extent (struct nbdkit_extents *extents, static int do_extents (struct command *cmd, struct vddk_handle *h) { - uint32_t count = cmd->count; - uint64_t offset = cmd->offset; - bool req_one = cmd->req_one; + const uint32_t count = cmd->count; + const uint64_t offset = cmd->offset; + const bool req_one = cmd->req_one; struct nbdkit_extents *extents = cmd->ptr; uint64_t position, end, start_sector; -- 2.47.1