From 7153c2c4454ef680106c4865c11958430243baf8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 10 Mar 2022 15:50:42 +0100 Subject: [PATCH] smbd: Avoid two else statements We return in the if-clause Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/smbd/dir.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index d0d0ec2a43f..258f88ab4d2 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -561,9 +561,11 @@ static uint32_t map_dir_offset_to_wire(struct dptr_struct *dptr, long offset) if (offset == END_OF_DIRECTORY_OFFSET) { return WIRE_END_OF_DIRECTORY_OFFSET; - } else if(offset == START_OF_DIRECTORY_OFFSET) { + } + if (offset == START_OF_DIRECTORY_OFFSET) { return WIRE_START_OF_DIRECTORY_OFFSET; - } else if (offset == DOT_DOT_DIRECTORY_OFFSET) { + } + if (offset == DOT_DOT_DIRECTORY_OFFSET) { return WIRE_DOT_DOT_DIRECTORY_OFFSET; } if (sizeof(long) == 4) {