diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-07 09:38:37 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-08-17 11:40:24 +0200 |
commit | adf20c0c4d9f488d55254f54a79079b9cacbde8d (patch) | |
tree | ccaaabb111532bf270df87a8a960dd8271481103 /daemon/guestfsd.c | |
parent | 2ad9dbbe595b5311019376a55b13db0d7c5d8988 (diff) | |
download | libguestfs-adf20c0c4d9f488d55254f54a79079b9cacbde8d.tar.gz libguestfs-adf20c0c4d9f488d55254f54a79079b9cacbde8d.tar.xz libguestfs-adf20c0c4d9f488d55254f54a79079b9cacbde8d.zip |
adjust const "**" pointers to avoid warnings
Also, ...
* src/generator.ml: Add DeviceList type, and propagate that change
out to all calling/interface code.
Diffstat (limited to 'daemon/guestfsd.c')
-rw-r--r-- | daemon/guestfsd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index b013661e..fad49fb6 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -351,7 +351,7 @@ add_string (char ***argv, int *size, int *alloc, const char *str) } int -count_strings (char * const* const argv) +count_strings (char *const *argv) { int argc; @@ -403,7 +403,7 @@ int command (char **stdoutput, char **stderror, const char *name, ...) { va_list args; - char **argv, **p; + const char **argv; char *s; int i, r; @@ -420,7 +420,7 @@ command (char **stdoutput, char **stderror, const char *name, ...) va_start (args, name); while ((s = va_arg (args, char *)) != NULL) { - p = realloc (argv, sizeof (char *) * (++i)); + const char **p = realloc (argv, sizeof (char *) * (++i)); if (p == NULL) { perror ("realloc"); free (argv); @@ -434,7 +434,7 @@ command (char **stdoutput, char **stderror, const char *name, ...) va_end (args); - r = commandv (stdoutput, stderror, argv); + r = commandv (stdoutput, stderror, (char **) argv); /* NB: Mustn't free the strings which are on the stack. */ free (argv); @@ -450,7 +450,7 @@ int commandr (char **stdoutput, char **stderror, const char *name, ...) { va_list args; - char **argv, **p; + const char **argv; char *s; int i, r; @@ -467,7 +467,7 @@ commandr (char **stdoutput, char **stderror, const char *name, ...) va_start (args, name); while ((s = va_arg (args, char *)) != NULL) { - p = realloc (argv, sizeof (char *) * (++i)); + const char **p = realloc (argv, sizeof (char *) * (++i)); if (p == NULL) { perror ("realloc"); free (argv); @@ -491,11 +491,11 @@ commandr (char **stdoutput, char **stderror, const char *name, ...) /* Same as 'command', but passing an argv. */ int -commandv (char **stdoutput, char **stderror, char * const* const argv) +commandv (char **stdoutput, char **stderror, char *const *argv) { int r; - r = commandrv (stdoutput, stderror, argv); + r = commandrv (stdoutput, stderror, (void *) argv); if (r == 0) return 0; else @@ -503,7 +503,7 @@ commandv (char **stdoutput, char **stderror, char * const* const argv) } int -commandrv (char **stdoutput, char **stderror, char * const* const argv) +commandrv (char **stdoutput, char **stderror, char const* const *argv) { int so_size = 0, se_size = 0; int so_fd[2], se_fd[2]; @@ -547,7 +547,7 @@ commandrv (char **stdoutput, char **stderror, char * const* const argv) close (so_fd[1]); close (se_fd[1]); - execvp (argv[0], argv); + execvp (argv[0], (void *) argv); perror (argv[0]); _exit (1); } |