summaryrefslogtreecommitdiffhomepage
path: root/src/driver/slbt_symlist_ctx.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-21 22:09:48 +0000
committermidipix <writeonce@midipix.org>2024-02-21 22:09:48 +0000
commitbb9df1d55b53becd6581f90a7c8dd54d6a72890d (patch)
tree285c2b604e2edd0ba207e107895b9202190845b2 /src/driver/slbt_symlist_ctx.c
parentfc7ad9f9947b5097e1a246b009b487d3206fd588 (diff)
downloadslibtool-bb9df1d55b53becd6581f90a7c8dd54d6a72890d.tar.bz2
slibtool-bb9df1d55b53becd6581f90a7c8dd54d6a72890d.tar.xz
code base: strictly conform to isspace()'s interface (int vs. signed char).
Diffstat (limited to 'src/driver/slbt_symlist_ctx.c')
-rw-r--r--src/driver/slbt_symlist_ctx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/driver/slbt_symlist_ctx.c b/src/driver/slbt_symlist_ctx.c
index 2a4997d..09bde7a 100644
--- a/src/driver/slbt_symlist_ctx.c
+++ b/src/driver/slbt_symlist_ctx.c
@@ -52,6 +52,7 @@ int slbt_lib_get_symlist_ctx(
char * src;
const char ** psym;
char dummy;
+ int cint;
bool fvalid;
/* map symlist file temporarily */
@@ -68,16 +69,16 @@ int slbt_lib_get_symlist_ctx(
src = mapinfo.size ? mapinfo.addr : &dummy;
cap = &src[mapinfo.size];
- for (; (src<cap) && isspace(*src); )
+ for (; (src<cap) && isspace((cint=*src)); )
src++;
for (ch=src,nsyms=0; ch<cap; nsyms++) {
- for (; (ch<cap) && !isspace(*ch); )
+ for (; (ch<cap) && !isspace((cint=*ch)); )
ch++;
fvalid = false;
- for (; (ch<cap) && isspace(*ch); )
+ for (; (ch<cap) && isspace((cint=*ch)); )
fvalid = (*ch++ == '\n') || fvalid;
if (!fvalid)
@@ -112,16 +113,16 @@ int slbt_lib_get_symlist_ctx(
src = ctx->symstrs;
cap = &src[mapinfo.size];
- for (; (src<cap) && isspace(*src); )
+ for (; (src<cap) && isspace((cint=*src)); )
src++;
for (ch=src,psym=ctx->symstrv; ch<cap; psym++) {
*psym = ch;
- for (; (ch<cap) && !isspace(*ch); )
+ for (; (ch<cap) && !isspace((cint=*ch)); )
ch++;
- for (; (ch<cap) && isspace(*ch); )
+ for (; (ch<cap) && isspace((cint=*ch)); )
*ch++ = '\0';
}