summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2006-06-14 18:46:21 +0000
committerderaadt <deraadt@openbsd.org>2006-06-14 18:46:21 +0000
commitde4ed5e7ff142c5f3a32a0daa96581317962a85a (patch)
tree399e1af6d7842e61d523f79bba469478966a3b79
parentclear the IFF_UP interface flag before shutting down the interface. (diff)
downloadwireguard-openbsd-de4ed5e7ff142c5f3a32a0daa96581317962a85a.tar.xz
wireguard-openbsd-de4ed5e7ff142c5f3a32a0daa96581317962a85a.zip
unused var, wrong check for too many keys; mrd@alkemio.org
-rw-r--r--sbin/ifconfig/ifconfig.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index f747df6756d..84fee5d09a6 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.165 2006/06/11 18:47:58 jmc Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.166 2006/06/14 18:46:21 deraadt Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -1334,7 +1334,6 @@ void
setifnwkey(const char *val, int d)
{
int i, len;
- char *cp = NULL;
struct ieee80211_nwkey nwkey;
u_int8_t keybuf[IEEE80211_WEP_NKID][16];
@@ -1372,7 +1371,7 @@ setifnwkey(const char *val, int d)
nwkey.i_key[i].i_keylen = len;
nwkey.i_key[i].i_keydat = keybuf[i];
}
- if (cp != NULL) {
+ if (*val != '\0') {
warnx("SIOCS80211NWKEY: too many keys.");
return;
}