Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137369541
D29022.id85010.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29022.id85010.diff
View Options
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -33,9 +33,6 @@
static const char copyright[] =
"@(#) Copyright (c) 1983, 1993\n\
The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
#if 0
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#endif
@@ -211,8 +208,6 @@
}
}
-#define ORDERS_SIZE(x) sizeof(x) / sizeof(x[0])
-
static int
calcorders(struct ifaddrs *ifa, struct ifa_queue *q)
{
@@ -242,7 +237,7 @@
if (ifa->ifa_addr) {
af = ifa->ifa_addr->sa_family;
- if (af < ORDERS_SIZE(cur->af_orders) &&
+ if (af < nitems(cur->af_orders) &&
cur->af_orders[af] == 0)
cur->af_orders[af] = ++ord;
}
@@ -293,8 +288,7 @@
af1 = a->ifa_addr->sa_family;
af2 = b->ifa_addr->sa_family;
- if (af1 < ORDERS_SIZE(e1->af_orders) &&
- af2 < ORDERS_SIZE(e1->af_orders))
+ if (af1 < nitems(e1->af_orders) && af2 < nitems(e1->af_orders))
return (e1->af_orders[af1] - e1->af_orders[af2]);
}
@@ -343,8 +337,6 @@
free(formatstr);
}
-#undef ORDERS_SIZE
-
static struct ifaddrs *
sortifaddrs(struct ifaddrs *list,
int (*compare)(struct ifaddrs *, struct ifaddrs *, struct ifa_queue *),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 23, 8:42 PM (22 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26031843
Default Alt Text
D29022.id85010.diff (1 KB)
Attached To
Mode
D29022: sbin/ifconfig: Minor housekeeping
Attached
Detach File
Event Timeline
Log In to Comment