commit bb8f40989fa558ec1cfcf321582993856654a7b9
parent 675ad6386d1e364686671211079368cb7d3ca4a0
Author: Hussam al-Homsi <sawuare@gmail.com>
Date: Sat, 2 Oct 2021 00:55:17 -0400
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>
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/text.c b/src/text.c
@@ -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;
diff --git a/src/utils.c b/src/utils.c
@@ -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. */