diff options
author | Thomas Graf <tgr@lsx.localdomain> | 2008-05-22 21:49:11 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@lsx.localdomain> | 2008-05-22 21:49:11 (GMT) |
commit | 304746f8d06a14bc911a2b58cf1c2398b02ead0a (patch) | |
tree | b8ce8a5fb332d208e79b6ebf669b5fcccc2d27db | |
parent | 5d82806b48959e4726ae3913ae0b3ce279c4c04a (diff) | |
download | libnl-304746f8d06a14bc911a2b58cf1c2398b02ead0a.zip libnl-304746f8d06a14bc911a2b58cf1c2398b02ead0a.tar.gz libnl-304746f8d06a14bc911a2b58cf1c2398b02ead0a.tar.bz2 |
Fix error code of nl_addr_resolve()
-rw-r--r-- | lib/addr.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -735,8 +735,12 @@ int nl_addr_resolve(struct nl_addr *addr, char *host, size_t hostlen) if (err < 0) return err; - return getnameinfo((struct sockaddr *) &buf, salen, - host, hostlen, NULL, 0, NI_NAMEREQD); + err = getnameinfo((struct sockaddr *) &buf, salen, host, hostlen, + NULL, 0, NI_NAMEREQD); + if (err < 0) + return nl_syserr2nlerr(err); + + return 0; } /** @} */ |