X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Fglob.c;h=8250c138a6608db240659de86c714b690764771f;hb=422678073bbd55053f020bc6743617792bb99d6b;hp=e17a9adcbd7a1e65d901a1f32993fd2750e3cc30;hpb=ffc75da7139f1ff447b597457458b72eba2bb108;p=libguestfs.git diff --git a/fish/glob.c b/fish/glob.c index e17a9ad..8250c13 100644 --- a/fish/glob.c +++ b/fish/glob.c @@ -28,10 +28,10 @@ /* A bit tricky because in the case where there are multiple * paths we have to perform a Cartesian product. */ -static void glob_issue (char *cmd, int argc, char ***globs, int *posn, int *count, int *r); +static void glob_issue (char *cmd, size_t argc, char ***globs, int *posn, int *count, int *r); int -run_glob (const char *cmd, int argc, char *argv[]) +run_glob (const char *cmd, size_t argc, char *argv[]) { /* For 'glob cmd foo /s* /usr/s*' this could be: * @@ -46,7 +46,8 @@ run_glob (const char *cmd, int argc, char *argv[]) char **globs[argc]; int posn[argc]; int count[argc]; - int i, r = 0; + size_t i; + int r = 0; if (argc < 1) { fprintf (stderr, _("use 'glob command [args...]'\n")); @@ -129,11 +130,11 @@ run_glob (const char *cmd, int argc, char *argv[]) } static void -glob_issue (char *cmd, int argc, +glob_issue (char *cmd, size_t argc, char ***globs, int *posn, int *count, int *r) { - int i; + size_t i; char *argv[argc+1]; argv[0] = cmd; @@ -143,7 +144,7 @@ glob_issue (char *cmd, int argc, for (i = 1; i < argc; ++i) argv[i] = globs[i][posn[i]]; - if (issue_command (argv[0], &argv[1], NULL) == -1) + if (issue_command (argv[0], &argv[1], NULL, 0) == -1) *r = -1; /* ... but don't exit */ for (i = argc-1; i >= 1; --i) {