mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
6a07ccbad2
commit
c44224ed29
1 changed files with 2 additions and 1 deletions
|
@ -561,7 +561,8 @@ int parse_txt_file(const char *filename, const char *csv)
|
||||||
cur_cylinder_index++;
|
cur_cylinder_index++;
|
||||||
|
|
||||||
lineptr = strstr(memtxt.buffer, "Dive started at");
|
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);
|
key = next_mkvi_key(lineptr);
|
||||||
if (!key)
|
if (!key)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue