client.c: use function parameter in cmdline_subscribe()

cmdline_subscribe() has used the global variable optarg instead of
the local argument that was passed to this function. Changing this
as intended also makes __attribute__((unused)) unneeded.
This commit is contained in:
Olaf Bergmann committed 2016-09-22 12:43:27 +02:00
1 parent 2c36cf4ade
commit d737344b52
1 file changed
+3 -3
+3 -3
View File
@@ -2,7 +2,7 @@
/* coap-client -- simple CoAP client
*
* Copyright (C) 2010--2015 Olaf Bergmann <bergmann@tzi.org>
* Copyright (C) 2010--2016 Olaf Bergmann <bergmann@tzi.org>
*
* This file is part of the CoAP library libcoap. Please see README for terms of
* use.
@@ -770,8 +770,8 @@ set_blocksize(void) {
}
static void
cmdline_subscribe(char *arg UNUSED_PARAM) {
obs_seconds = atoi(optarg);
cmdline_subscribe(char *arg) {
obs_seconds = atoi(arg);
coap_insert(&optlist, new_option_node(COAP_OPTION_SUBSCRIPTION, 0, NULL));
}