aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-10-17 13:18:48 +0200
committerMattias Andrée <m@maandree.se>2026-10-17 13:18:48 +0200
commit44fa4f3567270b3a8e624aee764b423e6aefb257 (patch)
tree21c2372a2a190e9b62b3f8a0bf721eec38c4b60a
parentm (diff)
downloadlibcmap-44fa4f3567270b3a8e624aee764b423e6aefb257.tar.gz
libcmap-44fa4f3567270b3a8e624aee764b423e6aefb257.tar.bz2
libcmap-44fa4f3567270b3a8e624aee764b423e6aefb257.tar.xz
m
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--Blocks.parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Blocks.parse.c b/Blocks.parse.c
index 1ae9fa9..c9b3013 100644
--- a/Blocks.parse.c
+++ b/Blocks.parse.c
@@ -24,6 +24,7 @@ parse_line(char *text, size_t lineno)
{
unsigned long int low, high;
char *name;
+ intptr_t j;
size_t i;
errno = 0;
@@ -55,8 +56,8 @@ parse_line(char *text, size_t lineno)
name = text;
while (*text && *text != ';')
text++;
- for (i = 1u; isspace(*(text - i)); i++)
- *(text - i) = '\0';
+ for (j = 1; isspace(text[-j]); j++)
+ text[-j] = '\0';
if (*text == ';') {
static int warned = 0;