[haiku-commits] Re: haiku: hrev51052 - src/add-ons/kernel/file_systems/ext2

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 30 Mar 2017 13:20:35 +0200

Am 30/03/2017 um 07:31 schrieb pulkomandy@xxxxxxxxxxxxx:

+                       || RevisionLevel() > EXT2_MAX_REVISION
+                       || ReservedGDTBlocks() > (1UL << BlockShift()) / 4)
                return false;
+       if (Has64bitFeature()) {
+               if (GroupDescriptorSize() > EXT2_BLOCK_GROUP_64BIT_SIZE       || 
GroupDescriptorSize() < EXT2_BLOCK_GROUP_NORMAL_SIZE)
+                       return false;
+       }
+       else {
+               if (GroupDescriptorSize() != EXT2_BLOCK_GROUP_NORMAL_SIZE)
+                       return false;
+       }

Style issues:
- The first if-clause is already considered a multi-line if, ie. needs {}.
- The first GroupDescriptorSize() doesn't fit on a single 80 character line.
- No line break before else:
} else {

Bye,
   Axel.

Other related posts: