From: Eric Bollengier Date: Sun, 14 Dec 2008 21:23:03 +0000 (+0000) Subject: ebl Use MIN() to clarify kern's fix X-Git-Tag: Release-3.0.0~481 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=065b78fda37c95b9e5379ee0ba3f6ce0acaf126a;p=bacula%2Fbacula ebl Use MIN() to clarify kern's fix git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8161 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/block.c b/bacula/src/stored/block.c index 75538522f7..9c58fe61e7 100644 --- a/bacula/src/stored/block.c +++ b/bacula/src/stored/block.c @@ -1116,10 +1116,7 @@ reread: dcr->EndBlock = dev->EndBlock; dcr->EndFile = dev->EndFile; } else { - uint32_t len = block->read_len; - if (len > block->block_len) { - len = block->block_len; - } + uint32_t len = MIN(block->read_len, block->block_len); uint64_t addr = dev->file_addr + len - 1; dcr->EndBlock = (uint32_t)addr; dcr->EndFile = (uint32_t)(addr >> 32);