Commit 49f64feb authored by David Lawrence's avatar David Lawrence
Browse files

removed an irrelevant cast to off_t in the offset wraparound check.

the expression in question is already of type isc_offset_t, which
is just a typedef for off_t.
parent 5fda9ca7
......@@ -1275,8 +1275,8 @@ journal_next(dns_journal_t *j, journal_pos_t *pos) {
* Check for offset wraparound.
*/
if (xhdr.size + sizeof(journal_rawxhdr_t) > ISC_OFFSET_MAXIMUM ||
(off_t)(ISC_OFFSET_MAXIMUM - xhdr.size - sizeof(journal_rawxhdr_t))
< pos->offset) {
ISC_OFFSET_MAXIMUM - xhdr.size - sizeof(journal_rawxhdr_t)
< pos->offset) {
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
"%s: offset too large", j->filename);
return (ISC_R_UNEXPECTED);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment