diff options
author | midipix <writeonce@midipix.org> | 2024-02-02 16:50:14 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-02 16:50:14 +0000 |
commit | 017165cd5837f13834cba38ea71573b981b48012 (patch) | |
tree | 1447e4e7fa93d5de4e2f4c3934b9f75e156424dc /src/arbits/output/slbt_ar_output_members.c | |
parent | b5595d6a50b5062aa28404aceff6ae55844a2b56 (diff) | |
download | slibtool-017165cd5837f13834cba38ea71573b981b48012.tar.bz2 slibtool-017165cd5837f13834cba38ea71573b981b48012.tar.xz |
slbt_ar_output_one_member_posix(): refactor in anticipation of -Wverbose.
Diffstat (limited to 'src/arbits/output/slbt_ar_output_members.c')
-rw-r--r-- | src/arbits/output/slbt_ar_output_members.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/arbits/output/slbt_ar_output_members.c b/src/arbits/output/slbt_ar_output_members.c index 5397675..66c8979 100644 --- a/src/arbits/output/slbt_ar_output_members.c +++ b/src/arbits/output/slbt_ar_output_members.c @@ -16,13 +16,24 @@ | SLBT_PRETTY_HEXDATA) +static int slbt_ar_output_one_member_posix( + int fdout, + struct ar_meta_member_info * memberp) +{ + return slbt_dprintf( + fdout,"%s\n", + memberp->ar_file_header.ar_member_name); +} + static int slbt_ar_output_members_posix( const struct slbt_driver_ctx * dctx, const struct slbt_archive_meta * meta, const struct slbt_fd_ctx * fdctx) { struct ar_meta_member_info ** memberp; - const char * name; + int fdout; + + fdout = fdctx->fdout; for (memberp=meta->a_memberv; *memberp; memberp++) { switch ((*memberp)->ar_member_attr) { @@ -32,9 +43,7 @@ static int slbt_ar_output_members_posix( break; default: - name = (*memberp)->ar_file_header.ar_member_name; - - if (slbt_dprintf(fdctx->fdout,"%s\n",name) < 0) + if (slbt_ar_output_one_member_posix(fdout,*memberp) < 0) return SLBT_SYSTEM_ERROR(dctx,0); } } |