examples/mqttc: Fix QOS arguments parsing (char->long).

Modify the switch cases in parsearg function for QOS levels definition.
The comparison was made between a long value and a char.

Signed-off-by: Mihai Pacuraru <mpacuraru@protonmail.com>
This commit is contained in:
Mihai Pacuraru 2026-02-28 11:43:31 +02:00 committed by simbit18
parent e4b84b29d4
commit c46ed184ed

View file

@ -192,13 +192,13 @@ static void parsearg(int argc, FAR char *argv[],
case 'q':
switch (strtol(optarg, NULL, 10))
{
case '0':
case 0L:
cfg->qos = MQTT_PUBLISH_QOS_0;
break;
case '1':
case 1L:
cfg->qos = MQTT_PUBLISH_QOS_1;
break;
case '2':
case 2L:
cfg->qos = MQTT_PUBLISH_QOS_2;
break;
}