Module Name: src Committed By: msaitoh Date: Mon Dec 12 05:09:33 UTC 2022
Modified Files: src/usr.bin/netstat: if.c Log Message: Use warn() instead of warnx() and simplify. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/usr.bin/netstat/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/netstat/if.c diff -u src/usr.bin/netstat/if.c:1.107 src/usr.bin/netstat/if.c:1.108 --- src/usr.bin/netstat/if.c:1.107 Sat Nov 19 14:42:35 2022 +++ src/usr.bin/netstat/if.c Mon Dec 12 05:09:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.107 2022/11/19 14:42:35 taca Exp $ */ +/* $NetBSD: if.c,v 1.108 2022/12/12 05:09:33 msaitoh Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else -__RCSID("$NetBSD: if.c,v 1.107 2022/11/19 14:42:35 taca Exp $"); +__RCSID("$NetBSD: if.c,v 1.108 2022/12/12 05:09:33 msaitoh Exp $"); #endif #endif /* not lint */ @@ -182,9 +182,8 @@ if_data_ext_get(const char *ifname, stru snprintf(namebuf, sizeof(namebuf), "net.interfaces.%s.sndq.drops", ifname); len = sizeof(drops); - if (sysctlbyname(namebuf, &drops, &len, NULL, 0) - == -1) { - warnx("'%s' not found", namebuf); + if (sysctlbyname(namebuf, &drops, &len, NULL, 0) == -1) { + warn("%s", namebuf); dext->ifi_oqdrops = 0; return -1; } else