systemcmds: reflect: write return needs to be used for werror checks

This commit is contained in:
Peter van der Perk 2024-03-31 21:18:16 +02:00 committed by Daniel Agar
parent 05badb5d76
commit 0c5b25efc5

View File

@ -121,7 +121,9 @@ reflect_main(int argc, char *argv[])
}
if (n > 0) {
write(1, buf, n);
if (write(1, buf, n) < 0) {
return -1;
}
}
total += n;