summaryrefslogtreecommitdiff
path: root/src/fallback
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/fallback
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/fallback')
-rw-r--r--src/fallback/slbt_archive_import_mri.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fallback/slbt_archive_import_mri.c b/src/fallback/slbt_archive_import_mri.c
index 76a4c06..fdcbf07 100644
--- a/src/fallback/slbt_archive_import_mri.c
+++ b/src/fallback/slbt_archive_import_mri.c
@@ -21,6 +21,7 @@
#include "slibtool_dprintf_impl.h"
#include "slibtool_symlink_impl.h"
#include "slibtool_readlink_impl.h"
+#include "slibtool_snprintf_impl.h"
#include "slibtool_errinfo_impl.h"
#define PPRIX64 "%"PRIx64
@@ -46,8 +47,8 @@ static char * slbt_mri_argument(
mricwd,sizeof(mricwd)) < 0)
return 0;
- if ((size_t)snprintf(dstbuf,sizeof(dstbuf),"%s/%s",
- mricwd,arg) >= sizeof(dstbuf))
+ if (slbt_snprintf(dstbuf,sizeof(dstbuf),
+ "%s/%s",mricwd,arg) < 0)
return 0;
target = dstbuf;
@@ -123,9 +124,8 @@ int slbt_archive_import_mri(
return 0;
/* program */
- if ((size_t)snprintf(program,sizeof(program),
- "%s",dctx->cctx->host.ar)
- >= sizeof(program))
+ if (slbt_snprintf(program,sizeof(program),
+ "%s",dctx->cctx->host.ar) < 0)
return SLBT_BUFFER_ERROR(dctx);
/* fork */