When no protocol entry is found, getproto*_r(3) should
return zero. Spotted by: Kostik Belousov <kostikbel__at__gmail.com> MFC after: 2 weeks
This commit is contained in:
parent
3f506a78ce
commit
c618a8562e
@ -123,7 +123,7 @@ getprotobynumber_r(int proto, struct protoent *pptr, char *buffer,
|
||||
|
||||
if (rv != NS_SUCCESS) {
|
||||
errno = ret_errno;
|
||||
return ((ret_errno != 0) ? ret_errno : -1);
|
||||
return (ret_errno);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ getprotoent_r(struct protoent *pptr, char *buffer, size_t buflen,
|
||||
|
||||
if (rv != NS_SUCCESS) {
|
||||
errno = ret_errno;
|
||||
return ((ret_errno != 0) ? ret_errno : -1);
|
||||
return (ret_errno);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ getprotobyname_r(const char *name, struct protoent *pptr, char *buffer,
|
||||
|
||||
if (rv != NS_SUCCESS) {
|
||||
errno = ret_errno;
|
||||
return ((ret_errno != 0) ? ret_errno : -1);
|
||||
return (ret_errno);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user