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
This commit is contained in:
George Kiagiadakis 2019-02-11 19:08:58 +02:00 committed by Wim Taymans
parent 4be52f16bd
commit 27e997a032

View file

@ -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);