From d737344b52f5c1ae5acfa9c8a79c444e13cf516c Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 22 Sep 2016 12:43:27 +0200 Subject: [PATCH] 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. --- examples/client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/client.c b/examples/client.c index 94382c4a..67223c88 100644 --- a/examples/client.c +++ b/examples/client.c @@ -2,7 +2,7 @@ /* coap-client -- simple CoAP client * - * Copyright (C) 2010--2015 Olaf Bergmann + * Copyright (C) 2010--2016 Olaf Bergmann * * 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)); }