projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c638cb
)
init: allow last line to be not terminated by '\n'
author
Denis Vlasenko
<vda.linux@googlemail.com>
Tue, 29 Jan 2008 09:56:21 +0000
(09:56 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Tue, 29 Jan 2008 09:56:21 +0000
(09:56 -0000)
init/init.c
patch
|
blob
|
history
diff --git
a/init/init.c
b/init/init.c
index 513ff340cdc39f1a8e634d32214b0e6b313f358c..9e24817b7538941d7e93b8ab1086b9a86812ce36 100644
(file)
--- a/
init/init.c
+++ b/
init/init.c
@@
-756,11
+756,11
@@
static void parse_inittab(void)
/* Skip leading spaces */
id = skip_whitespace(buf);
- /* Skip the line if it's a comment */
- if (*id == '#' || *id == '\n')
- continue;
/* Trim the trailing '\n' */
*strchrnul(id, '\n') = '\0';
+ /* Skip the line if it is a comment */
+ if (*id == '#' || *id == '\0')
+ continue;
/* Line is: "id:runlevel_ignored:action:command" */
runlev = strchr(id, ':');