From f057044480a9cbbd731c3531e34dae3c60acfdbb Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Thu, 13 Nov 2025 18:05:18 +0530 Subject: [PATCH] fish: Use size_t instead of int for iteration over an array Signed-off-by: Susant Sahani --- fish/copy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fish/copy.c b/fish/copy.c index bd35cf85e..e701ebe95 100644 --- a/fish/copy.c +++ b/fish/copy.c @@ -50,11 +50,10 @@ run_copy_in (const char *cmd, size_t argc, char *argv[]) if (remote == NULL) return -1; - const int nr_locals = argc-1; + const size_t nr_locals = argc-1; /* Upload each local one at a time using copy-in. */ - int i; - for (i = 0; i < nr_locals; ++i) { + for (size_t i = 0; i < nr_locals; ++i) { int r = guestfs_copy_in (g, argv[i], remote); if (r == -1) return -1;