diff options
author | brian <brian@FreeBSD.org> | 2001-04-14 21:33:58 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-04-14 21:33:58 +0000 |
commit | 16b3606e12ad51bd25669226e25cfdebd9fbeb6e (patch) | |
tree | c6f2c42c02e1e6403001773da259a1cfbb47c451 | |
parent | 6da31e65f87031889e2e00fc71656baacdde3fdb (diff) | |
download | FreeBSD-src-16b3606e12ad51bd25669226e25cfdebd9fbeb6e.zip FreeBSD-src-16b3606e12ad51bd25669226e25cfdebd9fbeb6e.tar.gz |
Call strlen() once instead of twice.
-rw-r--r-- | sys/kern/kern_conf.c | 4 |
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; |