From bf66fbc8e2380717c1fab860cfc60c78582839dd Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 21 Dec 2006 13:23:14 +0000 Subject: introduce LONE_CHAR (optimized strcmp with one-char string) --- networking/inetd.c | 2 +- networking/libiproute/ipaddress.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'networking') diff --git a/networking/inetd.c b/networking/inetd.c index 4856b11..7c89be2 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -759,7 +759,7 @@ static servtab_t *getconfigent(void) while (nsep != NULL) { nsep->se_checked = 1; if (nsep->se_family == AF_INET) { - if (!strcmp(nsep->se_hostaddr, "*")) + if (LONE_CHAR(nsep->se_hostaddr, '*')) nsep->se_ctrladdr_in.sin_addr.s_addr = INADDR_ANY; else if (!inet_aton(nsep->se_hostaddr, &nsep->se_ctrladdr_in.sin_addr)) { struct hostent *hp; diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 9fb08e6..e6130e4 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) if (brd_len) { duparg("broadcast", *argv); } - if (strcmp(*argv, "+") == 0) { + if (LONE_CHAR(*argv, '+')) { brd_len = -1; } else if (LONE_DASH(*argv)) { -- cgit v1.1