summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-19 20:44:02 -0400
committermidipix <writeonce@midipix.org>2016-04-19 20:44:02 -0400
commitf7d68756a5a99137ab5ae95425b35bae8256aaa5 (patch)
tree9c8376943a32393338f78713a609324f06e12adb /src/logic
parenta87fd1bc7ba0cfaf0e6368724a849a05d99e3533 (diff)
downloadslibtool-f7d68756a5a99137ab5ae95425b35bae8256aaa5.tar.bz2
slibtool-f7d68756a5a99137ab5ae95425b35bae8256aaa5.tar.xz
execution context: avoid '\0' when assigning a value to a character type.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_ctx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index e4145bc..754ea4b 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -192,13 +192,13 @@ int slbt_get_exec_ctx(
if (ref && (dctx->cctx->mode == SLBT_MODE_COMPILE)) {
if ((ch[-4] == '.') && (ch[-3] == 'l') && (ch[-2] == 'o')) {
ch[-3] = 'o';
- ch[-2] = '\0';
+ ch[-2] = 0;
ch--;
} else if (ictx->ctx.csrc) {
if ((mark = strrchr(ictx->ctx.lbasename,'.'))) {
ch = mark;
*++ch = 'o';
- *++ch = '\0';
+ *++ch = 0;
ch++;
}
}
@@ -212,7 +212,7 @@ int slbt_get_exec_ctx(
for (; *ch; ch++)
if (*ch == ',') {
- *ch++ = '\0';
+ *ch++ = 0;
ictx->ctx.argv[i++] = ch;
}
} else {