HomeFreeBSD

bintrans: Error out if writing to the output failed.

Description

bintrans: Error out if writing to the output failed.

  • Cover all code paths.
  • When decoding, check all output files, not just the last one.
  • A simple ferror() check is not enough as an error may later occur while flushing whatever remains in the output buffer.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D43532

(cherry picked from commit 5cb28f7979773715615cc2131fe40e0c5879ed1d)

bintrans: Fix uninitialized variable.

prev may be used uninitialized if body starts with a newline.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D43534

(cherry picked from commit bce34cba07bcfed9cd519a658e594c9910c8f210)

bintrans: Add base64 to name list in manual page.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: 0mp, pstef
Differential Revision: https://reviews.freebsd.org/D43558

(cherry picked from commit 64028ac3ba9668cff31bfe2c79d85a3b89e10953)

bintrans: Remove unused variable.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D43559

(cherry picked from commit bc2913d1736c2b299a265741a779014d001bd108)

Details

Provenance
desAuthored on Feb 1 2024, 1:10 PM
Reviewer
allanjude
Differential Revision
D43532: bintrans: Error out if writing to the output failed.
Parents
rGe705ac7788b2: net80211: Fix two typos in kernel messages
Branches
Unknown
Tags
Unknown