summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Graf <tgr@lsx.localdomain>2008-05-22 21:49:11 (GMT)
committerThomas Graf <tgr@lsx.localdomain>2008-05-22 21:49:11 (GMT)
commit304746f8d06a14bc911a2b58cf1c2398b02ead0a (patch)
treeb8ce8a5fb332d208e79b6ebf669b5fcccc2d27db
parent5d82806b48959e4726ae3913ae0b3ce279c4c04a (diff)
downloadlibnl-304746f8d06a14bc911a2b58cf1c2398b02ead0a.zip
libnl-304746f8d06a14bc911a2b58cf1c2398b02ead0a.tar.gz
libnl-304746f8d06a14bc911a2b58cf1c2398b02ead0a.tar.bz2
Fix error code of nl_addr_resolve()
-rw-r--r--lib/addr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/addr.c b/lib/addr.c
index 17047c8..1d3460e 100644
--- a/lib/addr.c
+++ b/lib/addr.c
@@ -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;
}
/** @} */