aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/candump.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-08-20 00:35:33 -0700
committerGuy Harris <gharris@sonic.net>2021-08-20 00:35:33 -0700
commitd679564d7b326ff6415ef791929d16c0b36841e4 (patch)
tree133300ce42ed25fe86c7802bd6f1f5e70f95bb81 /wiretap/candump.c
parent1b54c40a5b77222cf4230e6d2dfbe292a782fcbe (diff)
Use the wsutil/pint.h functions to fill in "exported PDU" headers.
That makes the code cleaner, including making it clearer that the fields in those headers are big-endian.
Diffstat (limited to 'wiretap/candump.c')
-rw-r--r--wiretap/candump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/candump.c b/wiretap/candump.c
index 8a965334d4..031996f59f 100644
--- a/wiretap/candump.c
+++ b/wiretap/candump.c
@@ -59,8 +59,8 @@ candump_write_packet(wtap_rec *rec, Buffer *buf, const msg_t *msg)
memset(buf_data, 0, packet_length);
- buf_data[1] = EXP_PDU_TAG_PROTO_NAME;
- buf_data[3] = proto_name_length;
+ phton16(buf_data + 0, EXP_PDU_TAG_PROTO_NAME);
+ phton16(buf_data + 2, proto_name_length);
memcpy(buf_data + 4, proto_name, strlen(proto_name));
if (msg->is_fd)