diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2004-04-25 19:56:50 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2004-04-25 19:56:50 +0000 |
| commit | 28aec5a68c85dcc7c451ec72f17f7165a4bfd058 (patch) | |
| tree | c6facc7890e1896c9f7d24683ec077343a174448 /lib/libc | |
| parent | a50d1c087646f3ca3788737f99100f7995b90d87 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/locale/ldpart.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/locale/ldpart.c b/lib/libc/locale/ldpart.c index 3c35e201a4fd..ea7b3886ada8 100644 --- a/lib/libc/locale/ldpart.c +++ b/lib/libc/locale/ldpart.c @@ -153,9 +153,13 @@ split_lines(char *p, const char *plim) { int i; - for (i = 0; p < plim; i++) { - p = strchr(p, '\n'); - *p++ = '\0'; + i = 0; + while (p < plim) { + if (*p == '\n') { + *p = '\0'; + i++; + } + p++; } return (i); } |
