diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-02-17 11:00:15 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-02-17 11:00:15 +0000 |
commit | 2dd585deb6ddaa6ed66998abca285823ba099be1 (patch) | |
tree | 202f14d08e6b8853b4e5b310341e98b96cacb9ca /sbin/iked/ikev2_pld.c | |
parent | 3115262ad87bc3b9d3f32c3f58f8ea380681ebaf (diff) |
Fix compiler warnings in the format strings: use %zd for ssize_t and
%zu for size_t.
From Andre de Oliveira
With input and OK from blambert@ markus@
Diffstat (limited to 'sbin/iked/ikev2_pld.c')
-rw-r--r-- | sbin/iked/ikev2_pld.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sbin/iked/ikev2_pld.c b/sbin/iked/ikev2_pld.c index df5ca6a5fc2..4ec1c5ae6be 100644 --- a/sbin/iked/ikev2_pld.c +++ b/sbin/iked/ikev2_pld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2_pld.c,v 1.37 2014/02/14 09:00:03 markus Exp $ */ +/* $OpenBSD: ikev2_pld.c,v 1.38 2014/02/17 11:00:14 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -453,7 +453,7 @@ ikev2_pld_id(struct iked *env, struct ikev2_payload *pld, return (-1); } - log_debug("%s: id %s length %d", __func__, idstr, len); + log_debug("%s: id %s length %zu", __func__, idstr, len); if (!ikev2_msg_frompeer(msg)) { ibuf_release(idb.id_buf); @@ -495,7 +495,7 @@ ikev2_pld_cert(struct iked *env, struct ikev2_payload *pld, buf = msgbuf + offset; len = betoh16(pld->pld_length) - sizeof(*pld) - sizeof(cert); - log_debug("%s: type %s length %d", + log_debug("%s: type %s length %zu", __func__, print_map(cert.cert_type, ikev2_cert_map), len); print_hex(buf, 0, len); @@ -535,7 +535,7 @@ ikev2_pld_certreq(struct iked *env, struct ikev2_payload *pld, buf = msgbuf + offset; len = betoh16(pld->pld_length) - sizeof(*pld) - sizeof(cert); - log_debug("%s: type %s length %d", + log_debug("%s: type %s length %zd", __func__, print_map(cert.cert_type, ikev2_cert_map), len); if (len < 0) { @@ -587,7 +587,7 @@ ikev2_pld_auth(struct iked *env, struct ikev2_payload *pld, buf = msgbuf + offset; len = betoh16(pld->pld_length) - sizeof(*pld) - sizeof(auth); - log_debug("%s: method %s length %d", + log_debug("%s: method %s length %zu", __func__, print_map(auth.auth_method, ikev2_auth_map), len); print_hex(buf, 0, len); @@ -763,7 +763,7 @@ ikev2_pld_notify(struct iked *env, struct ikev2_payload *pld, } memcpy(&cpi, buf, sizeof(cpi)); memcpy(&transform, buf + sizeof(cpi), sizeof(transform)); - log_debug("%s: cpi 0x%x, transform %s, len %d", __func__, + log_debug("%s: cpi 0x%x, transform %s, len %zu", __func__, betoh16(cpi), print_map(transform, ikev2_ipcomp_map), len); /* we only support deflate */ if ((msg->msg_policy->pol_flags & IKED_POLICY_IPCOMP) && @@ -924,7 +924,7 @@ ikev2_pld_delete(struct iked *env, struct ikev2_payload *pld, } } - log_warnx("%s: deleted %d spis", __func__, found); + log_warnx("%s: deleted %zu spis", __func__, found); } if (found) { @@ -962,7 +962,7 @@ ikev2_pld_ts(struct iked *env, struct ikev2_payload *pld, len = betoh16(pld->pld_length) - sizeof(*pld) - sizeof(tsp); - log_debug("%s: count %d length %d", __func__, + log_debug("%s: count %d length %zu", __func__, tsp.tsp_count, len); for (i = 0; i < tsp.tsp_count; i++) { @@ -1081,7 +1081,7 @@ ikev2_pld_cp(struct iked *env, struct ikev2_payload *pld, buf = msgbuf + offset; len = betoh16(pld->pld_length) - sizeof(*pld) - sizeof(cp); - log_debug("%s: type %s length %d", + log_debug("%s: type %s length %zu", __func__, print_map(cp.cp_type, ikev2_cp_map), len); print_hex(buf, 0, len); |