HomeFreeBSD

resizewin: Stop printing bogus NUL to TTY

Description

resizewin: Stop printing bogus NUL to TTY

A char array has an implicit NUL terminating it, which sizeof will
include, so we need to subtract 1 here. Printing a NUL can cause issues
for things like CI environments that aren't expecting it, especially
with recent Jenkins being stricter about not putting NUL in XML files.

Fixes: 3d222369acbe ("Add a small tool, resizewin(1), to query terminal for window size")
MFC after: 1 week

(cherry picked from commit 456c1199d3b3ee477463c6469940c0370de2b2ea)

Details

Provenance
jrtc27Authored on Jun 14 2023, 10:58 PM
Parents
rG051f41ddb517: libpmc: Handle PMCALLOCATE log with PMC code on PMU event system
Branches
Unknown
Tags
Unknown