summaryrefslogtreecommitdiff
path: root/Userland/Applications/HexEditor/HexEditorWidget.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2021-05-27 16:08:05 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-27 22:56:21 +0200
commitd7797c8bf8888f00d7e8e9360939112a0dde5b8d (patch)
tree78d1d1ec0983005b15257a3da52cd523307e33b0 /Userland/Applications/HexEditor/HexEditorWidget.cpp
parentf7667901edac2c1fc41fc7bba9518ebf3ca82caa (diff)
downloadserenity-d7797c8bf8888f00d7e8e9360939112a0dde5b8d.zip
Userland: Treat inet_pton returning 0 as an error
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).
Diffstat (limited to 'Userland/Applications/HexEditor/HexEditorWidget.cpp')
0 files changed, 0 insertions, 0 deletions