]> git.sur5r.net Git - bacula/bacula/commit
Fix inet_pton call.
authorMarco van Wieringen <mvw@planets.elm.net>
Tue, 26 Jun 2012 19:43:19 +0000 (21:43 +0200)
committerMarco van Wieringen <mvw@planets.elm.net>
Tue, 26 Jun 2012 19:43:19 +0000 (21:43 +0200)
commit47bea71d15eacd309fc098ab187f4e31156e53c9
tree528d3dceea273336eab55206d77c8e7ae83ab18b
parenta2b1477bc19870dc52e46955f24a2215dd40137e
Fix inet_pton call.

inet_pton returns 1 when it succeeds so the test was wrong. When
it fails its either returns 0 if not a correct ipv6 address or
-1 when the protocol family is not known. Checked the man page
for both Linux and Solaris and this seems like an oversight as
the definition is the same on these OSes and probably on all others
as these functions tend to be rather portable.

Also did some small rewrite of the code so its easier to read and
the braces are easier to interpret.
bacula/src/lib/bnet.c