mirror of
https://github.com/troglobit/finit.git
synced 2026-10-03 22:43:08 +07:00
Chomp trailing LF in line from conf file
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
+5
-3
@@ -162,9 +162,11 @@ int main()
|
||||
while (!feof(f)) {
|
||||
fgets(line, LINE_SIZE, f);
|
||||
|
||||
if (debug) {
|
||||
printf("conf: %s", line);
|
||||
}
|
||||
if (line[i = strlen(line)] == '\n')
|
||||
line[i] = 0;
|
||||
|
||||
if (debug)
|
||||
printf("conf: %s\n", line);
|
||||
|
||||
if ((x = strstr(line, "check ")) == line) {
|
||||
x += 6;
|
||||
|
||||
Reference in New Issue
Block a user