mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibC: inet_pton() should return 1 on success, 0 or -1 on failure.
This commit is contained in:
parent
d080f6e8dd
commit
d03505bc29
3 changed files with 7 additions and 3 deletions
|
@ -38,7 +38,7 @@ int main(int argc, char** argv)
|
|||
dst_addr.sin_family = AF_INET;
|
||||
dst_addr.sin_port = htons(80);
|
||||
rc = inet_pton(AF_INET, addr_str, &dst_addr.sin_addr);
|
||||
if (rc < 0) {
|
||||
if (rc <= 0) {
|
||||
perror("inet_pton");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue