A library function shall not set errno to 0.
Reviewed by: mdf
This commit is contained in:
parent
6d07d3e014
commit
c532f8c4d6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250706
@ -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