Chomp trailing LF in line from conf file

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
Claudio Matsuoka
2008-05-05 15:24:01 -03:00
parent 01509376cc
commit 75d755afad
+5 -3
View File
@@ -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;