preinit: check return from write()
This commit is contained in:
parent
7bc9cb6c55
commit
6971d03520
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue