From c44224ed29980aaf269d52847b08dce00ffe69f9 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 7 Jan 2018 15:47:36 +0100 Subject: 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 --- core/import-csv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/import-csv.c') 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; -- cgit v1.2.3-70-g09d2