35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
|
From dff3fc3b97aab79f6ee168a9b9dd2dff05425439 Mon Sep 17 00:00:00 2001
|
||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||
|
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 <eblake@redhat.com>
|
||
|
(cherry picked from commit 24fd7df460ae31fe3f72b5100ca3dbe138bbadbe)
|
||
|
---
|
||
|
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.43.0
|
||
|
|