]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Rename a function argument to avoid shadowing a variable in global scope
authorJouni Malinen <j@w1.fi>
Sat, 12 Nov 2016 17:26:47 +0000 (19:26 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 12 Nov 2016 17:26:47 +0000 (19:26 +0200)
Do not use optarg as a function argument since a variable with that name
is in the global scope.

Signed-off-by: Jouni Malinen <j@w1.fi>
hostapd/main.c

index 2c8dbd30a274e927ab7615b6e66c0a0898297d09..c0d65c473e7b47f4c8336a506f4ee88052536a2d 100644 (file)
@@ -549,14 +549,14 @@ static int hostapd_get_ctrl_iface_group(struct hapd_interfaces *interfaces,
 
 static int hostapd_get_interface_names(char ***if_names,
                                       size_t *if_names_size,
-                                      char *optarg)
+                                      char *arg)
 {
        char *if_name, *tmp, **nnames;
        size_t i;
 
-       if (!optarg)
+       if (!arg)
                return -1;
-       if_name = strtok_r(optarg, ",", &tmp);
+       if_name = strtok_r(arg, ",", &tmp);
 
        while (if_name) {
                nnames = os_realloc_array(*if_names, 1 + *if_names_size,