diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-20 13:19:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-20 17:46:47 +0200 |
commit | c0d02ffc3d11e96977b549563f679c5bfe30f359 (patch) | |
tree | 3470589077bff99339d192a095949617ce992f53 /include/net.h | |
parent | 33c488f8c13bb606a6b60df04461d56fc782574a (diff) | |
download | barebox-c0d02ffc3d11e96977b549563f679c5bfe30f359.tar.gz barebox-c0d02ffc3d11e96977b549563f679c5bfe30f359.tar.xz |
Fix string_to_ip
Use a pointer to an ip address instead of the return value in string_to_ip
and use the return value for error indication only. 0.0.0.0 can be a valid
ip address
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h index 969aae583c..d59ae5caa7 100644 --- a/include/net.h +++ b/include/net.h @@ -398,7 +398,7 @@ static inline void NetCopyLong(ulong *to, ulong *from) char * ip_to_string (IPaddr_t x, char *s); /* Convert a string to ip address */ -IPaddr_t string_to_ip(const char *s); +int string_to_ip(const char *s, IPaddr_t *ip); /* Convert a VLAN id to a string */ void VLAN_to_string (ushort x, char *s); |