diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-10-28 07:43:33 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-28 07:43:33 -0700 |
commit | 70a2e91f1cb41a09d9b3c4b67042416c52b3fe4a (patch) | |
tree | dbb10555429a2b168a8c41a0c84e3582b57f18e0 /file.c | |
parent | 85df7ebb0288fa988c83e3783ae7eb0d10567960 (diff) | |
download | subsurface-70a2e91f1cb41a09d9b3c4b67042416c52b3fe4a.tar.gz |
Assigment in if statements
This is one of the warnings that I agree with. The original code was very
hard on my eyes... the explicit comparison to NULL is just so much easier
to understand when reading the code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -715,14 +715,14 @@ int parse_seabear_csv_file(const char *filename, int timef, int depthf, int temp /* Determine NL (new line) character and the start of CSV data */ ptr = mem.buffer; - while (ptr = strstr(ptr, "\r\n\r\n")) { + while ((ptr = strstr(ptr, "\r\n\r\n")) != NULL) { ptr_old = ptr; ptr += 1; NL = "\r\n"; } if (!ptr_old) { - while (ptr = strstr(ptr, "\n\n")) { + while ((ptr = strstr(ptr, "\n\n")) != NULL) { ptr_old = ptr; ptr += 1; } |