svn commit: trunk/busybox/init
vda at busybox.net
vda at busybox.net
Tue Jan 29 09:56:23 UTC 2008
Author: vda
Date: 2008-01-29 01:56:21 -0800 (Tue, 29 Jan 2008)
New Revision: 20922
Log:
init: allow last line to be not terminated by '\n'
Modified:
trunk/busybox/init/init.c
Changeset:
Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c 2008-01-29 09:31:09 UTC (rev 20921)
+++ trunk/busybox/init/init.c 2008-01-29 09:56:21 UTC (rev 20922)
@@ -756,11 +756,11 @@
/* 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, ':');
More information about the busybox-cvs
mailing list