fix the inet_pton test of the os-test test suite
This commit is contained in:
@@ -222,7 +222,7 @@ pub unsafe extern "C" fn inet_pton(af: c_int, src: *const c_char, dst: *mut c_vo
|
||||
for part in s_addr.iter_mut().take(4) {
|
||||
if let Some(n) = octets
|
||||
.next()
|
||||
.filter(|x| !x.len() > 3)
|
||||
.filter(|x| x.len() <= 3)
|
||||
.and_then(|x| u8::from_str(x).ok())
|
||||
{
|
||||
*part = n;
|
||||
|
||||
@@ -168,6 +168,7 @@ pub const MCAST_LEAVE_SOURCE_GROUP: c_int = 47;
|
||||
/// Internet domain sockets for use with IPv4 sockets.
|
||||
pub const AF_INET: c_int = 2;
|
||||
/// Internet domain sockets for use with IPv6 sockets.
|
||||
#[cfg(feature = "ip6")]
|
||||
pub const AF_INET6: c_int = 10;
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/unix.7.html>.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user