From: Volker Lendecke Date: Mon, 10 Nov 2025 16:03:42 +0000 (+0100) Subject: lib: Reduce indentation X-Git-Tag: tdb-1.4.15~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=285875e45b911c4323c939fa6e6426fcbce80386;p=thirdparty%2Fsamba.git lib: Reduce indentation Avoid a few "else" statements, review with "git show -w". Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/lib/util/fsusage.c b/lib/util/fsusage.c index f71a2aed50a..c8dc0b3db9b 100644 --- a/lib/util/fsusage.c +++ b/lib/util/fsusage.c @@ -33,15 +33,20 @@ static uint64_t adjust_blocks(uint64_t blocks, uint64_t fromsize, uint64_t tosiz { if (fromsize == tosize) { /* e.g., from 512 to 512 */ return blocks; - } else if (fromsize > tosize) { /* e.g., from 2048 to 512 */ + } + + if (fromsize > tosize) { /* e.g., from 2048 to 512 */ return blocks * (fromsize / tosize); - } else { /* e.g., from 256 to 512 */ - /* Protect against broken filesystems... */ - if (fromsize == 0) { - fromsize = tosize; - } - return (blocks + 1) / (tosize / fromsize); } + + /* e.g., from 256 to 512 */ + /* Protect against broken filesystems... */ + + if (fromsize == 0) { + fromsize = tosize; + } + + return (blocks + 1) / (tosize / fromsize); } /**