diff options
Diffstat (limited to 'coopgammad.c')
| -rw-r--r-- | coopgammad.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/coopgammad.c b/coopgammad.c index 50ba53b..3f4eb78 100644 --- a/coopgammad.c +++ b/coopgammad.c @@ -37,7 +37,7 @@ /** * Lists all function recognised adjustment methods, - * will call macro X with the code for the each + * will call macro X with the code for each * adjustment method as the first argument and * corresponding name as the second argument */ @@ -166,7 +166,7 @@ GCC_ONLY(__attribute__((__nonnull__))) static int get_method(const char *restrict arg) { -#if LIBGAMMA_METHOD_MAX > 5 +#if LIBGAMMA_METHOD_COUNT > 6 # warning libgamma has added more adjustment methods #endif @@ -278,7 +278,7 @@ daemonise(int keep_stderr) fd = open(pidpath, O_WRONLY); if (fd < 0) goto fail; - if (dprintf(fd, "%llu\n", (unsigned long long)getpid()) < 0) + if (dprintf(fd, "%llu\n", (unsigned long long int)getpid()) < 0) goto fail; close(fd); fd = -1; @@ -664,6 +664,7 @@ static int print_method_and_site(int query) { const char *restrict methodname = NULL; + const char *const_sitename; char *p; if (query == 1) { @@ -682,8 +683,8 @@ print_method_and_site(int query) } if (!sitename) - if ((sitename = libgamma_method_default_site(method))) - if (!(sitename = memdup(sitename, strlen(sitename) + 1))) + if ((const_sitename = libgamma_method_default_site(method))) + if (!(sitename = memdup(const_sitename, strlen(const_sitename) + 1))) return -1; if (sitename) { |
