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>master
parent
675ad6386d
commit
bb8f40989f
|
@ -186,7 +186,7 @@ size_t length_of_white(const char *text)
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
if (*text == '\t')
|
if (*text == '\t')
|
||||||
return ++white_count;
|
return white_count + 1;
|
||||||
|
|
||||||
if (*text != ' ')
|
if (*text != ' ')
|
||||||
return white_count;
|
return white_count;
|
||||||
|
|
|
@ -61,7 +61,7 @@ const char *tail(const char *path)
|
||||||
if (slash == NULL)
|
if (slash == NULL)
|
||||||
return path;
|
return path;
|
||||||
else
|
else
|
||||||
return ++slash;
|
return slash + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a copy of the two given strings, welded together. */
|
/* Return a copy of the two given strings, welded together. */
|
||||||
|
|
Loading…
Reference in New Issue