diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-11-11 21:25:32 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-11-11 21:25:32 (GMT) |
commit | 2847cf081b88678a2bb780c59a2678131d47c11d (patch) | |
tree | 00b3f2617eedb9627b1edaca97241e54603d6b44 /lib | |
parent | 12b82e4f6f7eb52d249534b85f4634263567cd84 (diff) | |
download | libnl-2847cf081b88678a2bb780c59a2678131d47c11d.zip libnl-2847cf081b88678a2bb780c59a2678131d47c11d.tar.gz libnl-2847cf081b88678a2bb780c59a2678131d47c11d.tar.bz2 |
Make nl_str2af return a negative value if parsing fails
Diffstat (limited to 'lib')
-rw-r--r-- | lib/addr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -921,7 +921,7 @@ char *nl_af2str(int family, char *buf, size_t size) int nl_str2af(const char *name) { int fam = __str2type(name, afs, ARRAY_SIZE(afs)); - return fam >= 0 ? fam : AF_UNSPEC; + return fam >= 0 ? fam : -EINVAL; } /** @} */ |