mirror of https://gerrit.osmocom.org/osmo-pcap
osmo_client_send_data: Fix wrong log format
According to pcap.h, type bpf_u_int32 can be 32 bits on some systems, so better cast explicitly to size_t to make sure always correct size is used by log function. Fixes warning: osmo-pcap/src/osmo_client_network.c:175:4: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘bpf_u_int32’ {aka ‘unsigned int’} [-Wformat=] "Capture len too big %zu\n", in_hdr->caplen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ Change-Id: I98654da143218d3e57da4e57781252eb3d3f3d5b
This commit is contained in:
parent
dc27ca85aa
commit
d475673b69
|
@ -172,7 +172,7 @@ void osmo_client_send_data(struct osmo_pcap_client_conn *conn,
|
|||
|
||||
if (in_hdr->caplen > 9000) {
|
||||
LOGP(DCLIENT, LOGL_ERROR,
|
||||
"Capture len too big %zu\n", in_hdr->caplen);
|
||||
"Capture len too big %zu\n", (size_t) in_hdr->caplen);
|
||||
rate_ctr_inc(&conn->client->ctrg->ctr[CLIENT_CTR_2BIG]);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue