mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-10 00:52:28 +02:00
The POSIX man-page states that inet_pton returns 0 if the input is not a valid IPv4 dotted-decimal string or a valid IPv6 address string. This is also how it is implemented in SerenityOS. This means that we should treat a return value of 0 as an error to avoid using an invalid address (or 0.0.0.0).
1.5 KiB
1.5 KiB