summaryrefslogtreecommitdiff
path: root/whois.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2017-02-26 23:12:47 +0100
committerMarco d'Itri <md@linux.it>2017-02-26 23:12:47 +0100
commit5e33209e133a0691602e3ce400d5fa893cb3b377 (patch)
treeb4287ac4dcf524dcbc216c3e59fe126d7341da04 /whois.c
parenta4815eb370626ec070b5be0fe4a901feb7c020fa (diff)
downloadwhois-5e33209e133a0691602e3ce400d5fa893cb3b377.tar.gz
Fix minor compiler warnings
Fix a lot of minor compiler warnings with no practical effect. Contributed by Sami Kerola.
Diffstat (limited to 'whois.c')
-rw-r--r--whois.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/whois.c b/whois.c
index 7c987ae..897a7ed 100644
--- a/whois.c
+++ b/whois.c
@@ -126,7 +126,8 @@ int main(int argc, char *argv[])
int longindex;
#endif
- int ch, nopar = 0, fstringlen = 64;
+ int ch, nopar = 0;
+ size_t fstringlen = 64;
const char *server = NULL, *port = NULL;
char *qstring, *fstring;
int ret;
@@ -1133,7 +1134,7 @@ const char *is_new_gtld(const char *s)
if (in_domain(s, new_gtlds[i]))
return new_gtlds[i];
- return 0;
+ return NULL;
}
/*
@@ -1232,7 +1233,7 @@ void split_server_port(const char *const input,
}
/* change the server name to lower case */
- for (p = (char *) *server; *p && *p != '\0'; p++)
+ for (p = (char *) *server; *p; p++)
*p = tolower(*p);
}
@@ -1268,7 +1269,7 @@ char *convert_6to4(const char *s)
}
new = malloc(sizeof("255.255.255.255"));
- sprintf(new, "%d.%d.%d.%d", a >> 8, a & 0xff, b >> 8, b & 0xff);
+ sprintf(new, "%ud.%ud.%ud.%ud", a >> 8, a & 0xff, b >> 8, b & 0xff);
#endif
return new;
@@ -1298,7 +1299,7 @@ char *convert_teredo(const char *s)
a ^= 0xffff;
b ^= 0xffff;
new = malloc(sizeof("255.255.255.255"));
- sprintf(new, "%d.%d.%d.%d", a >> 8, a & 0xff, b >> 8, b & 0xff);
+ sprintf(new, "%ud.%ud.%ud.%ud", a >> 8, a & 0xff, b >> 8, b & 0xff);
#endif
return new;