Browse Source

driver_nl80211: Return correct value

Signed-off-by: Michael Bernhard <michael.bernhard at bfh.ch>
Michael Bernhard 17 years ago
parent
commit
f4a5a7468d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      hostapd/driver_nl80211.c

+ 2 - 2
hostapd/driver_nl80211.c

@@ -220,7 +220,7 @@ static int i802_set_encryption(const char *iface, void *priv, const char *alg,
 	if (nl_send_auto_complete(drv->nl_handle, msg) < 0 ||
 	    (err = nl_wait_for_ack(drv->nl_handle)) < 0) {
 		if (err != -ENOENT) {
-			err = 0;
+			ret = 0;
 			goto out;
 		}
 	}
@@ -249,7 +249,7 @@ static int i802_set_encryption(const char *iface, void *priv, const char *alg,
 	if (nl_send_auto_complete(drv->nl_handle, msg) < 0 ||
 	    (err = nl_wait_for_ack(drv->nl_handle)) < 0) {
 		if (err != -ENOENT) {
-			err = 0;
+			ret = 0;
 			goto out;
 		}
 	}