Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/systat Make this build with clang:
details: https://anonhg.NetBSD.org/src/rev/3458db6869b3
branches: trunk
changeset: 346828:3458db6869b3
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Thu Aug 04 12:56:31 2016 +0000
description:
Make this build with clang:
- Remove unused static const variables
- Adjust impossibleish comparision.
diffstat:
usr.bin/systat/ifstat.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 7239766c0b8b -r 3458db6869b3 usr.bin/systat/ifstat.c
--- a/usr.bin/systat/ifstat.c Thu Aug 04 12:38:11 2016 +0000
+++ b/usr.bin/systat/ifstat.c Thu Aug 04 12:56:31 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifstat.c,v 1.2 2016/08/02 17:53:46 scole Exp $ */
+/* $NetBSD: ifstat.c,v 1.3 2016/08/04 12:56:31 jakllsch Exp $ */
/*
* Copyright (c) 2003, Trent Nelson, <trent%arpa.com@localhost>.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ifstat.c,v 1.2 2016/08/02 17:53:46 scole Exp $");
+__RCSID("$NetBSD: ifstat.c,v 1.3 2016/08/04 12:56:31 jakllsch Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -60,12 +60,9 @@
#define C4 60 /* 60-80 */
#define C5 80 /* Used for label positioning. */
-static const int col0 = 0;
-static const int col1 = C1;
static const int col2 = C2;
static const int col3 = C3;
static const int col4 = C4;
-static const int col5 = C5;
SLIST_HEAD(, if_stat) curlist;
@@ -356,7 +353,7 @@
int str_len = 0, pad_len = 0;
char *newstr = NULL, *ptr = NULL;
- if (ifp == NULL || ifp->if_mib.ifdr_name == NULL)
+ if (ifp == NULL || ifp->if_mib.ifdr_name[0] == '\0')
return;
else {
/* string length + '\0' */
Home |
Main Index |
Thread Index |
Old Index