summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e14c018)
Fred Strauss reported a problem with parsing empty lines in the config
file; we weren't checking if the line was empty before stripping
trailing white space. We do now.
fgets(curline, 1023, conffile);
while (!feof(conffile)) {
fgets(curline, 1023, conffile);
while (!feof(conffile)) {
- for (i = strlen(curline) - 1; isspace(curline[i]); i--) {
- curline[i] = 0;
- }
+ for (i = strlen(curline) - 1;
+ i >= 0 && isspace(curline[i]);
+ i--) {
+ curline[i] = 0;
+ }
if (curline[0] == '#' || curline[0] == 0) {
/*
if (curline[0] == '#' || curline[0] == 0) {
/*