diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-01-07 15:47:36 +0100 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-01-11 06:07:13 +0100 |
commit | c44224ed29980aaf269d52847b08dce00ffe69f9 (patch) | |
tree | 0278b1f8b19706bec56925ac92c7924cd030d8a6 /core/import-csv.c | |
parent | 6a07ccbad273cdcbea3f984c5c2e9d1b272aae05 (diff) | |
download | subsurface-c44224ed29980aaf269d52847b08dce00ffe69f9.tar.gz |
Move always true ++lineptr out of while-condition
In core/file.c move ++lineptr out of the while condition
!empty_string(lineptr) && (lineptr = strchr(lineptr, '\n') && ++lineptr
since it always evaluates to true.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/import-csv.c')
-rw-r--r-- | core/import-csv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/import-csv.c b/core/import-csv.c index f1a55950f..d3f665111 100644 --- a/core/import-csv.c +++ b/core/import-csv.c @@ -561,7 +561,8 @@ int parse_txt_file(const char *filename, const char *csv) cur_cylinder_index++; lineptr = strstr(memtxt.buffer, "Dive started at"); - while (!empty_string(lineptr) && (lineptr = strchr(lineptr, '\n')) && ++lineptr) { + while (!empty_string(lineptr) && (lineptr = strchr(lineptr, '\n'))) { + ++lineptr; // Skip over '\n' key = next_mkvi_key(lineptr); if (!key) break; |