]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Use MIN() to clarify kern's fix
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 14 Dec 2008 21:23:03 +0000 (21:23 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 14 Dec 2008 21:23:03 +0000 (21:23 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8161 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/block.c

index 75538522f7caa56f8b9524f8e420713e44b3835b..9c58fe61e7bf885e315c0626012232b6ff264535 100644 (file)
@@ -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);