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-7.0.0~3633 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=af998c91d6d27653c0ae80ec7725bd099f47fd89;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);