From 27e997a032b50019ad6099c823be2bf82f544a23 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Mon, 11 Feb 2019 19:08:58 +0200 Subject: [PATCH] daemon: getopt returns int, declare it as such to avoid comparison issues On some toolchains/architectures, a char with -1 value is not equal to the integer -1, resulting in this code to think that it got an unrecognized command line option --- src/daemon/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/main.c b/src/daemon/main.c index 3388c4235..d4b0ae34a 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) {"name", 1, NULL, 'n'}, {NULL, 0, NULL, 0} }; - char c; + int c; pw_init(&argc, &argv);