summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-21 13:23:14 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-21 13:23:14 +0000
commitbf66fbc8e2380717c1fab860cfc60c78582839dd (patch)
tree3ab3dd4df901851ff7f4345708592118766ba4aa /networking
parent6910741067913d131d931b1e6424d3b8ed43e64f (diff)
downloadbusybox-w32-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.gz
busybox-w32-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.bz2
busybox-w32-bf66fbc8e2380717c1fab860cfc60c78582839dd.zip
introduce LONE_CHAR (optimized strcmp with one-char string)
Diffstat (limited to 'networking')
-rw-r--r--networking/inetd.c2
-rw-r--r--networking/libiproute/ipaddress.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/networking/inetd.c b/networking/inetd.c
index 4856b11ae..7c89be28f 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -759,7 +759,7 @@ static servtab_t *getconfigent(void)
759 while (nsep != NULL) { 759 while (nsep != NULL) {
760 nsep->se_checked = 1; 760 nsep->se_checked = 1;
761 if (nsep->se_family == AF_INET) { 761 if (nsep->se_family == AF_INET) {
762 if (!strcmp(nsep->se_hostaddr, "*")) 762 if (LONE_CHAR(nsep->se_hostaddr, '*'))
763 nsep->se_ctrladdr_in.sin_addr.s_addr = INADDR_ANY; 763 nsep->se_ctrladdr_in.sin_addr.s_addr = INADDR_ANY;
764 else if (!inet_aton(nsep->se_hostaddr, &nsep->se_ctrladdr_in.sin_addr)) { 764 else if (!inet_aton(nsep->se_hostaddr, &nsep->se_ctrladdr_in.sin_addr)) {
765 struct hostent *hp; 765 struct hostent *hp;
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 9fb08e6ba..e6130e4d7 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -678,7 +678,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv)
678 if (brd_len) { 678 if (brd_len) {
679 duparg("broadcast", *argv); 679 duparg("broadcast", *argv);
680 } 680 }
681 if (strcmp(*argv, "+") == 0) { 681 if (LONE_CHAR(*argv, '+')) {
682 brd_len = -1; 682 brd_len = -1;
683 } 683 }
684 else if (LONE_DASH(*argv)) { 684 else if (LONE_DASH(*argv)) {