aboutsummaryrefslogtreecommitdiffstats
path: root/coopgammad.c
diff options
context:
space:
mode:
Diffstat (limited to 'coopgammad.c')
-rw-r--r--coopgammad.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/coopgammad.c b/coopgammad.c
index 50ba53b..8638679 100644
--- a/coopgammad.c
+++ b/coopgammad.c
@@ -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) {