From 21137fd11bb52ff1a24987c4f51946b85f6eb0af Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Wed, 23 Sep 2020 09:14:38 +0100 Subject: [PATCH] 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 --- mqtt-arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5