mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 17:02:56 +03:00
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:
1 parent
2c36cf4ade
commit
d737344b52
1 file changed
+3
-3
+3
-3
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user