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_uninstall.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_uninstall.c')
-rw-r--r-- | src/logic/slbt_exec_uninstall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_uninstall.c b/src/logic/slbt_exec_uninstall.c index 9ffed87..c50c8dd 100644 --- a/src/logic/slbt_exec_uninstall.c +++ b/src/logic/slbt_exec_uninstall.c @@ -15,6 +15,7 @@ #include "slibtool_driver_impl.h" #include "slibtool_uninstall_impl.h" #include "slibtool_readlink_impl.h" +#include "slibtool_snprintf_impl.h" #include "slibtool_errinfo_impl.h" #include "argv/argv.h" @@ -170,8 +171,9 @@ static int slbt_exec_uninstall_entry( char path [PATH_MAX]; char lpath[PATH_MAX]; - if ((size_t)snprintf(path,PATH_MAX,"%s", - entry->arg) >= PATH_MAX-8) + if (slbt_snprintf(path, + PATH_MAX - 8, + "%s",entry->arg) < 0) return SLBT_BUFFER_ERROR(dctx); *parg = (char *)entry->arg; |