summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-11-04 14:52:20 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-11-04 16:28:32 +0100
commit1a9542cfd1f59a329e8cb32fb1737e7c8a11ecd2 (patch)
tree63a117c86f6690a3288a9475699df1d8ebcb125a
parentfdc58aee064856ba312cbdf45cef6fba5dc9f6da (diff)
downloadtcpdump-1a9542cfd1f59a329e8cb32fb1737e7c8a11ecd2.tar.gz
LDP: Use %zu to print sizeof values
Moreover: Fix indentation.
-rw-r--r--print-ldp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/print-ldp.c b/print-ldp.c
index 75e6dd20..896bc403 100644
--- a/print-ldp.c
+++ b/print-ldp.c
@@ -593,10 +593,10 @@ ldp_pdu_print(netdissect_options *ndo,
pdu_len = GET_BE_U_2(ldp_com_header->pdu_length);
if (pdu_len < sizeof(struct ldp_common_header)-4) {
/* length too short */
- ND_PRINT("%sLDP, pdu-length: %u (too short, < %u)",
- (ndo->ndo_vflag < 1) ? "" : "\n\t",
- pdu_len,
- (u_int)(sizeof(struct ldp_common_header)-4));
+ ND_PRINT("%sLDP, pdu-length: %u (too short, < %zu)",
+ (ndo->ndo_vflag < 1) ? "" : "\n\t",
+ pdu_len,
+ sizeof(struct ldp_common_header)-4);
return 0;
}
@@ -626,13 +626,13 @@ ldp_pdu_print(netdissect_options *ndo,
if (msg_len < sizeof(struct ldp_msg_header)-4) {
/* length too short */
/* FIXME vendor private / experimental check */
- ND_PRINT("\n\t %s Message (0x%04x), length: %u (too short, < %u)",
- tok2str(ldp_msg_values,
- "Unknown",
- msg_type),
- msg_type,
- msg_len,
- (u_int)(sizeof(struct ldp_msg_header)-4));
+ ND_PRINT("\n\t %s Message (0x%04x), length: %u (too short, < %zu)",
+ tok2str(ldp_msg_values,
+ "Unknown",
+ msg_type),
+ msg_type,
+ msg_len,
+ sizeof(struct ldp_msg_header)-4);
return 0;
}