From: Jonathan McDowell Date: Wed, 23 Sep 2020 08:14:38 +0000 (+0100) Subject: Fix option parsing on some platforms (e.g. ARM) X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=21137fd11bb52ff1a24987c4f51946b85f6eb0af;p=mqtt-arp.git Fix option parsing on some platforms (e.g. ARM) getopt_long returns an int, not a char, and on some platforms we hit issues with the sign extension as a result. Do it properly. Fixes #2 --- diff --git a/mqtt-arp.c b/mqtt-arp.c index 2836366..bc65fbb 100644 --- a/mqtt-arp.c +++ b/mqtt-arp.c @@ -361,7 +361,7 @@ int main(int argc, char *argv[]) struct ma_config config; int option_index = 0; int macs = 0; - char c; + int c; bzero(&config, sizeof(config)); config.mqtt_port = MQTT_PORT;