summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-04-14 21:33:58 +0000
committerbrian <brian@FreeBSD.org>2001-04-14 21:33:58 +0000
commit16b3606e12ad51bd25669226e25cfdebd9fbeb6e (patch)
treec6f2c42c02e1e6403001773da259a1cfbb47c451
parent6da31e65f87031889e2e00fc71656baacdde3fdb (diff)
downloadFreeBSD-src-16b3606e12ad51bd25669226e25cfdebd9fbeb6e.zip
FreeBSD-src-16b3606e12ad51bd25669226e25cfdebd9fbeb6e.tar.gz
Call strlen() once instead of twice.
-rw-r--r--sys/kern/kern_conf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index c40447b..bfb3ce5 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -374,9 +374,9 @@ dev_stdclone(char *name, char **namep, char *stem, int *unit)
{
int u, i;
- if (bcmp(stem, name, strlen(stem)) != 0)
- return (0);
i = strlen(stem);
+ if (bcmp(stem, name, i) != 0)
+ return (0);
if (!isdigit(name[i]))
return (0);
u = 0;
OpenPOWER on IntegriCloud