git.ucc.asn.au
/
tpg
/
opendispense2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up config handling a little
[tpg/opendispense2.git]
/
src
/
common
/
config.c
diff --git
a/src/common/config.c
b/src/common/config.c
index
ca6db69
..
886da57
100644
(file)
--- a/
src/common/config.c
+++ b/
src/common/config.c
@@
-80,12
+80,12
@@
int Config_ParseFile(const char *Filename)
}
}
}
}
- while( i --, isspace(line[i]) )
- line[i] = 0;
+ // Trim trailing whitespace
+ while( i -- && isspace(line[i]) )
+ line[i] = '\0';
}
}
-
- if( regexec(®exp_empty, line, 1, matches, 0) == 0 )
+ if( line[0] == '\0' ) // regexec(®exp_empty, line, 1, matches, 0) == 0 )
continue ;
if( RunRegex(®exp_option, line, 3, matches, "Parsing configuration file") )
continue ;
if( RunRegex(®exp_option, line, 3, matches, "Parsing configuration file") )
UCC
git Repository :: git.ucc.asn.au