diff options
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/daemon.h | 2 | ||||
-rw-r--r-- | daemon/guestfsd.c | 4 | ||||
-rw-r--r-- | daemon/parted.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/daemon/daemon.h b/daemon/daemon.h index de598cd3..d90b65cd 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -43,7 +43,7 @@ extern int xread (int sock, void *buf, size_t len) __attribute__((__warn_unused_result__)); extern int add_string (char ***argv, int *size, int *alloc, const char *str); -extern int count_strings (char *const *argv); +extern size_t count_strings (char *const *argv); extern void sort_strings (char **argv, int len); extern void free_strings (char **argv); extern void free_stringslen (char **argv, int len); diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index c0d524aa..f9e5a682 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -544,10 +544,10 @@ add_string (char ***argv, int *size, int *alloc, const char *str) return 0; } -int +size_t count_strings (char *const *argv) { - int argc; + size_t argc; for (argc = 0; argv[argc] != NULL; ++argc) ; diff --git a/daemon/parted.c b/daemon/parted.c index 9c65570f..bf45f8b8 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -392,7 +392,7 @@ do_part_get_bootable (const char *device, int partnum) return -1; /* We want lines[1+partnum]. */ - if (count_strings (lines) < 1+partnum) { + if (count_strings (lines) < (size_t) (1+partnum)) { reply_with_error ("partition number out of range: %d", partnum); free_strings (lines); return -1; |