diff options
author | Petr Písař <ppisar@redhat.com> | 2013-11-11 17:28:59 +0100 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2013-12-26 07:48:10 +0100 |
commit | 298f2080fe7d15eace3daf705d61a56c678a9b44 (patch) | |
tree | f12ca01f8d3dc67064fd9526c724f5f287767297 /whois.c | |
parent | 4808ec3bd89325ca668a84990c9eca43b2980b86 (diff) | |
download | whois-298f2080fe7d15eace3daf705d61a56c678a9b44.tar.gz |
strtol() returns signed long int
Assiging strol() return value to unsigned int makes subsequent
comparison to < 0 pointless.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Diffstat (limited to 'whois.c')
-rw-r--r-- | whois.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1118,7 +1118,7 @@ char *convert_inaddr(const char *s) { char *new; char *endptr; - unsigned int a, b = 0, c = 0; + long int a, b = 0, c = 0; errno = 0; @@ -1142,7 +1142,7 @@ char *convert_inaddr(const char *s) } new = malloc(sizeof("255.255.255.255")); - sprintf(new, "%d.%d.%d.0", c, b, a); + sprintf(new, "%ld.%ld.%ld.0", c, b, a); return new; } |