aboutsummaryrefslogtreecommitdiff
path: root/plugins-root
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-11-28 16:20:55 +0100
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-11-28 16:23:28 +0100
commit9c289ec74498e236d3b32abc15e789a653a3c586 (patch)
treeba30ef5a299acd48d0c9b5b472e77a295b92e015 /plugins-root
parent8e5118e0cba939a3a2854204ee3169466190018f (diff)
downloadmonitoring-plugins-9c289ec74498e236d3b32abc15e789a653a3c586.tar.gz
check_icmp: Fix a few type errors
Diffstat (limited to 'plugins-root')
-rw-r--r--plugins-root/check_icmp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index 07713257..44c6826c 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -470,13 +470,13 @@ main(int argc, char **argv)
/* parse the arguments */
for(i = 1; i < argc; i++) {
while((arg = getopt(argc, argv, "vhVw:c:n:p:t:H:s:i:b:I:l:m:")) != EOF) {
- long size;
+ unsigned short size;
switch(arg) {
case 'v':
debug++;
break;
case 'b':
- size = strtol(optarg,NULL,0);
+ size = (unsigned short)strtol(optarg,NULL,0);
if (size >= (sizeof(struct icmp) + sizeof(struct icmp_ping_data)) &&
size < MAX_PING_DATA) {
icmp_data_size = size;
@@ -785,7 +785,7 @@ wait_for_reply(int sock, u_int t)
/* this is indeed a valid response */
memcpy(&data, icp.icmp_data, sizeof(data));
if (debug > 2)
- printf("ICMP echo-reply of len %u, id %u, seq %u, cksum 0x%X\n",
+ printf("ICMP echo-reply of len %lu, id %u, seq %u, cksum 0x%X\n",
sizeof(data), ntohs(icp.icmp_id), ntohs(icp.icmp_seq), icp.icmp_cksum);
host = table[ntohs(icp.icmp_seq)/packets];
@@ -864,7 +864,7 @@ send_icmp_ping(int sock, struct rta_host *host)
packet.icp->icmp_cksum = icmp_checksum(packet.cksum_in, icmp_pkt_size);
if (debug > 2)
- printf("Sending ICMP echo-request of len %u, id %u, seq %u, cksum 0x%X to host %s\n",
+ printf("Sending ICMP echo-request of len %lu, id %u, seq %u, cksum 0x%X to host %s\n",
sizeof(data), ntohs(packet.icp->icmp_id), ntohs(packet.icp->icmp_seq), packet.icp->icmp_cksum, host->name);
memset(&iov, 0, sizeof(iov));
@@ -1232,7 +1232,7 @@ static u_int
get_timevar(const char *str)
{
char p, u, *ptr;
- unsigned int len;
+ size_t len;
u_int i, d; /* integer and decimal, respectively */
u_int factor = 1000; /* default to milliseconds */