diff options
author | midipix <writeonce@midipix.org> | 2024-02-10 02:50:51 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-10 03:01:55 +0000 |
commit | 19022ee7547839690948a7a9807930a7891f3f15 (patch) | |
tree | 782384fd6f5c56272efdfd29533a623937fe9ea6 /src/logic/slbt_exec_execute.c | |
parent | 2f8d3eabcf743d1e398277e7b4e6a03bbdd574ee (diff) | |
download | slibtool-19022ee7547839690948a7a9807930a7891f3f15.tar.bz2 slibtool-19022ee7547839690948a7a9807930a7891f3f15.tar.xz |
code base: simplify checks against value returned from snprintf() via wrapper.
Diffstat (limited to 'src/logic/slbt_exec_execute.c')
-rw-r--r-- | src/logic/slbt_exec_execute.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_execute.c b/src/logic/slbt_exec_execute.c index 971ff3c..7b7ec97 100644 --- a/src/logic/slbt_exec_execute.c +++ b/src/logic/slbt_exec_execute.c @@ -13,6 +13,7 @@ #include <slibtool/slibtool.h> #include "slibtool_spawn_impl.h" #include "slibtool_driver_impl.h" +#include "slibtool_snprintf_impl.h" #include "slibtool_errinfo_impl.h" int slbt_exec_execute( @@ -60,10 +61,9 @@ int slbt_exec_execute( sprintf(mark,".libs/%s",base); /* wrapper */ - if ((size_t)snprintf(wrapper,sizeof(wrapper), + if (slbt_snprintf(wrapper,sizeof(wrapper), "%s.exe.wrapper", - exeref) - >= sizeof(wrapper)) { + exeref) < 0) { slbt_free_exec_ctx(actx); return SLBT_BUFFER_ERROR(dctx); } |