diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2010-02-22 20:54:01 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2010-02-22 20:54:01 +0000 |
commit | c9e59b4a339522f01dcaa883989656f31534a124 (patch) | |
tree | 21ed005c70654fb1043c0f3a184b8120f09b726c /Settings.c | |
parent | 7dcd2beb90a560819bf634e6b7dbd50686c026d9 (diff) |
minor tweaks by David Weber
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -63,12 +63,10 @@ static bool Settings_read(Settings* this, char* fileName) { if (fd == NULL) { return false; } - const int maxLine = 65535; + const int maxLine = 2048; char buffer[maxLine]; bool readMeters = false; - while (!feof(fd)) { - buffer[0] = '\0'; - fgets(buffer, maxLine, fd); + while (fgets(buffer, maxLine, fd)) { char** option = String_split(buffer, '='); if (String_eq(option[0], "fields")) { char* trim = String_trim(option[1]); |