Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ifconfig Minor correction to prior
details: https://anonhg.NetBSD.org/src/rev/6573622a693e
branches: trunk
changeset: 976862:6573622a693e
user: roy <roy%NetBSD.org@localhost>
date: Mon Oct 05 17:29:22 2020 +0000
description:
Minor correction to prior
diffstat:
sbin/ifconfig/media.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 957289eb13e8 -r 6573622a693e sbin/ifconfig/media.c
--- a/sbin/ifconfig/media.c Mon Oct 05 16:54:41 2020 +0000
+++ b/sbin/ifconfig/media.c Mon Oct 05 17:29:22 2020 +0000
@@ -1,6 +1,6 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: media.c,v 1.11 2020/10/05 16:17:05 roy Exp $");
+__RCSID("$NetBSD: media.c,v 1.12 2020/10/05 17:29:22 roy Exp $");
#endif /* not lint */
#include <assert.h>
@@ -424,10 +424,10 @@
return;
}
- /* Interface link status is queried through SIOCGIFMEDIA.
- * Not all interfaces have actual media. */
- if (ifmr.ifm_count == 0)
+ if (ifmr.ifm_count == 0) {
warnx("%s: no media types?", ifname);
+ return;
+ }
media_list = calloc(ifmr.ifm_count, sizeof(int));
if (media_list == NULL)
Home |
Main Index |
Thread Index |
Old Index