A library function shall not set errno to 0.
Reviewed by: mdf
This commit is contained in:
parent
6d07d3e014
commit
c532f8c4d6
@ -706,9 +706,10 @@ sbuf_finish(struct sbuf *s)
|
||||
#ifdef _KERNEL
|
||||
return (s->s_error);
|
||||
#else
|
||||
errno = s->s_error;
|
||||
if (s->s_error)
|
||||
if (s->s_error != 0) {
|
||||
errno = s->s_error;
|
||||
return (-1);
|
||||
}
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user