]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
resizewin: Stop printing bogus NUL to TTY
authorJessica Clarke <jrtc27@FreeBSD.org>
Wed, 14 Jun 2023 22:58:36 +0000 (23:58 +0100)
committerJessica Clarke <jrtc27@FreeBSD.org>
Wed, 14 Jun 2023 22:58:36 +0000 (23:58 +0100)
commit456c1199d3b3ee477463c6469940c0370de2b2ea
treef3b3b07cc9be9015ebf632039e993415b07ed076
parent6eb2dbfa63e87a1cf624a44d97ebab9c9b63a474
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
usr.bin/resizewin/resizewin.c