OSDN Git Service
(root)
/
android-x86
/
external-busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66c2205
)
Treat NUL as the end-of-line.
author
Matt Kraai
<kraai@debian.org>
Tue, 20 Nov 2001 15:49:50 +0000
(15:49 -0000)
committer
Matt Kraai
<kraai@debian.org>
Tue, 20 Nov 2001 15:49:50 +0000
(15:49 -0000)
libbb/get_line_from_file.c
patch
|
blob
|
history
diff --git
a/libbb/get_line_from_file.c
b/libbb/get_line_from_file.c
index
9035c04
..
5e70621
100644
(file)
--- a/
libbb/get_line_from_file.c
+++ b/
libbb/get_line_from_file.c
@@
-45,7
+45,7
@@
extern char *get_line_from_file(FILE *file)
while (idx > linebufsz-2)
linebuf = xrealloc(linebuf, linebufsz += GROWBY);
linebuf[idx++] = (char)ch;
- if (
(char)ch == '\n
')
+ if (
ch == '\n' || ch == '\0
')
break;
}