summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-06-20 19:37:37 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-06-20 19:37:37 +0000
commit33990d60f5ee5316004f49e484547c6a08002650 (patch)
tree753ad06bd926c114ecf2f20691b704c0987d179a
parent989a854e3d5e110be8fe4cf650612623ad70866c (diff)
wi_ssid_len is in little-endian as well, so convert it. fixes ssid
printing on sparc64; millert@ ok.
-rw-r--r--sbin/wicontrol/wicontrol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/wicontrol/wicontrol.c b/sbin/wicontrol/wicontrol.c
index 1b7e67317fb..21b7db4a083 100644
--- a/sbin/wicontrol/wicontrol.c
+++ b/sbin/wicontrol/wicontrol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wicontrol.c,v 1.38 2002/06/19 18:53:53 millert Exp $ */
+/* $OpenBSD: wicontrol.c,v 1.39 2002/06/20 19:37:36 fgsch Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -69,7 +69,7 @@
static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\
Bill Paul. All rights reserved.";
static const char rcsid[] =
- "@(#) $OpenBSD: wicontrol.c,v 1.38 2002/06/19 18:53:53 millert Exp $";
+ "@(#) $OpenBSD: wicontrol.c,v 1.39 2002/06/20 19:37:36 fgsch Exp $";
#endif
void wi_getval(char *, struct wi_req *);
@@ -538,7 +538,7 @@ wi_printaplist(iface)
for (nap = 0; i < (wreq.wi_len * 2) - len; i += len) {
res = (struct wi_scan_res *)((char *)wreq.wi_val + i);
- res->wi_ssid[res->wi_ssid_len] = '\0';
+ res->wi_ssid[letoh16(res->wi_ssid_len)] = '\0';
res->wi_chan = letoh16(res->wi_chan);
res->wi_noise = letoh16(res->wi_noise);
res->wi_signal = letoh16(res->wi_signal);