tweaks: change 'return ++var;' to 'return var + 1;'

This avoids an unused and misleading assignment that might make
someone think the incremented variable will be used again.

Signed-off-by: Hussam al-Homsi <sawuare@gmail.com>
This commit is contained in:
Hussam al-Homsi 2021-10-02 00:55:17 -04:00 committed by Benno Schulenberg
parent 675ad6386d
commit bb8f40989f
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ size_t length_of_white(const char *text)
while (TRUE) {
if (*text == '\t')
return ++white_count;
return white_count + 1;
if (*text != ' ')
return white_count;

View File

@ -61,7 +61,7 @@ const char *tail(const char *path)
if (slash == NULL)
return path;
else
return ++slash;
return slash + 1;
}
/* Return a copy of the two given strings, welded together. */