mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
85df7ebb02
commit
70a2e91f1c
1 changed files with 2 additions and 2 deletions
4
file.c
4
file.c
|
@ -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 */
|
/* Determine NL (new line) character and the start of CSV data */
|
||||||
ptr = mem.buffer;
|
ptr = mem.buffer;
|
||||||
while (ptr = strstr(ptr, "\r\n\r\n")) {
|
while ((ptr = strstr(ptr, "\r\n\r\n")) != NULL) {
|
||||||
ptr_old = ptr;
|
ptr_old = ptr;
|
||||||
ptr += 1;
|
ptr += 1;
|
||||||
NL = "\r\n";
|
NL = "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ptr_old) {
|
if (!ptr_old) {
|
||||||
while (ptr = strstr(ptr, "\n\n")) {
|
while ((ptr = strstr(ptr, "\n\n")) != NULL) {
|
||||||
ptr_old = ptr;
|
ptr_old = ptr;
|
||||||
ptr += 1;
|
ptr += 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue