From af998c91d6d27653c0ae80ec7725bd099f47fd89 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 14 Dec 2008 21:23:03 +0000 Subject: [PATCH] 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 --- bacula/src/stored/block.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); -- 2.39.5