summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-10 02:50:51 +0000
committermidipix <writeonce@midipix.org>2024-02-10 03:01:55 +0000
commit19022ee7547839690948a7a9807930a7891f3f15 (patch)
tree782384fd6f5c56272efdfd29533a623937fe9ea6 /src/helper
parent2f8d3eabcf743d1e398277e7b4e6a03bbdd574ee (diff)
downloadslibtool-19022ee7547839690948a7a9807930a7891f3f15.tar.bz2
slibtool-19022ee7547839690948a7a9807930a7891f3f15.tar.xz
code base: simplify checks against value returned from snprintf() via wrapper.
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/slbt_dump_machine.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/helper/slbt_dump_machine.c b/src/helper/slbt_dump_machine.c
index 3d3a454..dfd32a4 100644
--- a/src/helper/slbt_dump_machine.c
+++ b/src/helper/slbt_dump_machine.c
@@ -15,6 +15,7 @@
#include <slibtool/slibtool.h>
#include "slibtool_spawn_impl.h"
+#include "slibtool_snprintf_impl.h"
static void slbt_dump_machine_child(
char * program,
@@ -61,8 +62,8 @@ int slbt_dump_machine(
return -1;
}
- if ((size_t)snprintf(program,sizeof(program),"%s",
- compiler) >= sizeof(program))
+ if (slbt_snprintf(program,sizeof(program),
+ "%s",compiler) < 0)
return -1;
/* fork */