projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compile error, last_patch81 by Vladimir N. Oleynik
[oweals/busybox.git]
/
networking
/
nameif.c
diff --git
a/networking/nameif.c
b/networking/nameif.c
index cd18b4c18d2f8f4b0a86614c4cec193130f2337c..f3b9271584373b2ed1bdfa2e363d36d1528a171f 100644
(file)
--- a/
networking/nameif.c
+++ b/
networking/nameif.c
@@
-36,7
+36,7
@@
#include "busybox.h"
/* take from linux/sockios.h */
#include "busybox.h"
/* take from linux/sockios.h */
-#define SIOCSIFNAME 0x8923
/* set interface name */
+#define SIOCSIFNAME 0x8923 /* set interface name */
/* Octets in one ethernet addr, from <linux/if_ether.h> */
#define ETH_ALEN 6
/* Octets in one ethernet addr, from <linux/if_ether.h> */
#define ETH_ALEN 6
@@
-101,13
+101,8
@@
int nameif_main(int argc, char **argv)
int if_index = 1;
mactable_t *ch;
int if_index = 1;
mactable_t *ch;
- static struct option opts[] = {
- {"syslog", 0, NULL, 's'},
- {"configfile", 1, NULL, 'c'},
- {NULL},
- };
- while ((opt = getopt
_long(argc, argv, "c:s", opts, NULL
)) != -1) {
+ while ((opt = getopt
(argc, argv, "c:s"
)) != -1) {
switch (opt) {
case 'c':
fname = optarg;
switch (opt) {
case 'c':
fname = optarg;
@@
-152,8
+147,7
@@
int nameif_main(int argc, char **argv)
ch = xcalloc(1, sizeof(mactable_t));
ch->ifname = xstrndup(line_ptr, name_length);
if (name_length > IF_NAMESIZE)
ch = xcalloc(1, sizeof(mactable_t));
ch->ifname = xstrndup(line_ptr, name_length);
if (name_length > IF_NAMESIZE)
- serror("interface name `%s' too long",
- ch->ifname);
+ serror("interface name `%s' too long", ch->ifname);
line_ptr += name_length;
line_ptr += strspn(line_ptr, " \t");
name_length = strspn(line_ptr, "0123456789ABCDEFabcdef:");
line_ptr += name_length;
line_ptr += strspn(line_ptr, " \t");
name_length = strspn(line_ptr, "0123456789ABCDEFabcdef:");