liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 6971d03520a4ebd3c33f3da6f01438608e3d560d
parent 7bc9cb6c55c9e6393139d685609d6cc38ac4d02c
Author: Daniel Barlow <dan@telent.net>
Date:   Sun,  7 Jan 2024 21:24:16 +0000

preinit: check return from write()

Diffstat:
Mpkgs/preinit/parseopts.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pkgs/preinit/parseopts.c b/pkgs/preinit/parseopts.c @@ -36,9 +36,10 @@ char * pr_u32(int32_t input) { i+=2; buf[i] ='\0'; - write(2, buf, i); - - return buf; + if(write(2, buf, i)) + return buf; + else + return NULL; }