From ef5859437ab088fb9deb858bfdd40fe31bb60ad7 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 1 Mar 2024 20:24:42 +0100 Subject: [PATCH] cleanup: remove ominous pointer calculation Firstly, why calculate something when the next statement is a return anyway. Secondly, the calculation subtracts two completely unrelated pointers. This must be some code reshuffling artifact. Signed-off-by: Berthold Stoeger --- core/import-csv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/import-csv.c b/core/import-csv.c index bdf19f3d0..816084645 100644 --- a/core/import-csv.c +++ b/core/import-csv.c @@ -222,10 +222,8 @@ static int parse_dan_format(const char *filename, struct xml_params *params, str continue; } - if (ptr && ptr[4] == '}') { - end_ptr += ptr - (char *)mem_csv.buffer; + if (ptr && ptr[4] == '}') return report_error(translate("gettextFromC", "No dive profile found from '%s'"), filename); - } if (ptr) ptr = parse_dan_new_line(ptr, NL);