mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 13:28:14 +00:00
Fixed a number of format bugs: %d -> %ld, plus (long int) cast.
This commit is contained in:
parent
743f0d251c
commit
d0042425f2
@ -402,19 +402,22 @@ void trace_file_replay (const char *filename)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (tracefile_header.version > TRACEFILE_VERSION) {
|
if (tracefile_header.version > TRACEFILE_VERSION) {
|
||||||
log_error ("tracefile version %d > current %d.",
|
log_error ("tracefile version %ld > current %ld.",
|
||||||
tracefile_header.version, TRACEFILE_VERSION);
|
(long int)tracefile_header.version,
|
||||||
|
(long int)TRACEFILE_VERSION);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (tracefile_header.phlen < sizeof *tpkt) {
|
if (tracefile_header.phlen < sizeof *tpkt) {
|
||||||
log_error ("tracefile packet size too small - %d < %d",
|
log_error ("tracefile packet size too small - %ld < %ld",
|
||||||
tracefile_header.phlen, sizeof *tpkt);
|
(long int)tracefile_header.phlen,
|
||||||
|
(long int)sizeof *tpkt);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
len = (sizeof tracefile_header) - tracefile_header.hlen;
|
len = (sizeof tracefile_header) - tracefile_header.hlen;
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
log_error ("tracefile header size too small - %d < %d",
|
log_error ("tracefile header size too small - %ld < %ld",
|
||||||
tracefile_header.hlen, sizeof tracefile_header);
|
(long int)tracefile_header.hlen,
|
||||||
|
(long int)sizeof tracefile_header);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
@ -470,8 +473,10 @@ isc_result_t trace_get_next_packet (trace_type_t **ttp,
|
|||||||
else if (status == 0)
|
else if (status == 0)
|
||||||
return ISC_R_EOF;
|
return ISC_R_EOF;
|
||||||
else
|
else
|
||||||
log_error ("Short read on trace packet header: %d %d.",
|
log_error ("Short read on trace packet header: "
|
||||||
status, tracefile_header.phlen);
|
"%ld %ld.",
|
||||||
|
(long int)status,
|
||||||
|
(long int)tracefile_header.phlen);
|
||||||
return ISC_R_PROTOCOLERROR;
|
return ISC_R_PROTOCOLERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -485,8 +490,8 @@ isc_result_t trace_get_next_packet (trace_type_t **ttp,
|
|||||||
trace_types [tpkt -> type_index])
|
trace_types [tpkt -> type_index])
|
||||||
ttype = trace_types [tpkt -> type_index];
|
ttype = trace_types [tpkt -> type_index];
|
||||||
else {
|
else {
|
||||||
log_error ("Trace packet with unknown index %d",
|
log_error ("Trace packet with unknown index %ld",
|
||||||
tpkt -> type_index);
|
(long int)tpkt -> type_index);
|
||||||
return ISC_R_PROTOCOLERROR;
|
return ISC_R_PROTOCOLERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user