btrfs: Fix various coding style issues
- Fix pointer/reference style in btrfs_disk_system.cpp
- Add missing blank line between class definitions in Inode.h
- Remove trailing whitespace in AttributeIterator.h
- Add missing space before inline comment in BTree.cpp
- Add missing space before '{' in ExtentAllocator.cpp
- Fix C-style cast pointer style in Volume.cpp
No functional changes.
Hashtags: gsoc2026
Change-Id: I7922a4736c072691163c05288f142cdaff1dcf9c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10469
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
4ce9cacce2
commit
0ed6a7bdeb
@@ -16,7 +16,7 @@ public:
|
||||
//! Constructs an AttributeIterator object for Inode object *inode
|
||||
AttributeIterator(Inode* inode);
|
||||
~AttributeIterator();
|
||||
//! Check if fIterator pointer is valid
|
||||
//! Check if fIterator pointer is valid
|
||||
status_t InitCheck();
|
||||
|
||||
/*! Copy details of next Attribute into *name and *_nameLength
|
||||
|
||||
@@ -248,7 +248,7 @@ status_t
|
||||
BTree::Node::MoveEntries(uint32 start, uint32 end, int length) const
|
||||
{
|
||||
status_t status = _SpaceCheck(length);
|
||||
if (status != B_OK || length == 0/*B_OK*/)
|
||||
if (status != B_OK || length == 0 /*B_OK*/)
|
||||
return status;
|
||||
|
||||
int entrySize = sizeof(btrfs_entry);
|
||||
|
||||
@@ -255,7 +255,7 @@ CachedExtentTree::_AddFreeExtent(CachedExtent* node)
|
||||
found->offset += diff + node->length;
|
||||
found->length -= diff + node->length;
|
||||
// diff < 0 couldn't happen because of the Compare function
|
||||
if (diff > 0){
|
||||
if (diff > 0) {
|
||||
CachedExtent* left = CachedExtent::Create(node->offset - diff,
|
||||
diff, found->flags);
|
||||
_AddAllocatedExtent(left);
|
||||
|
||||
@@ -99,6 +99,7 @@ private:
|
||||
btrfs_inode fNode;
|
||||
};
|
||||
|
||||
|
||||
/*!The Vnode class provides a convenience layer upon get_vnode(), so that
|
||||
* you don't have to call put_vnode() anymore, which may make code more
|
||||
* readable in some cases
|
||||
|
||||
@@ -521,7 +521,7 @@ status_t
|
||||
Volume::WriteSuperBlock()
|
||||
{
|
||||
uint32 checksum = calculate_crc((uint32)~1,
|
||||
(uint8 *)&fSuperBlock + sizeof(fSuperBlock.checksum),
|
||||
(uint8*)&fSuperBlock + sizeof(fSuperBlock.checksum),
|
||||
sizeof(fSuperBlock) - sizeof(fSuperBlock.checksum));
|
||||
|
||||
fSuperBlock.checksum[0] = (checksum >> 0) & 0xFF;
|
||||
|
||||
@@ -17,20 +17,20 @@ parse_initialize_parameters(const char* parameterString,
|
||||
{
|
||||
parameters.verbose = false;
|
||||
|
||||
void *handle = parse_driver_settings_string(parameterString);
|
||||
void* handle = parse_driver_settings_string(parameterString);
|
||||
if (handle == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
if (get_driver_boolean_parameter(handle, "verbose", false, true))
|
||||
parameters.verbose = true;
|
||||
|
||||
const char *ss_string = get_driver_parameter(handle, "sector_size",
|
||||
const char* ss_string = get_driver_parameter(handle, "sector_size",
|
||||
NULL, NULL);
|
||||
uint32 sectorSize = B_PAGE_SIZE;
|
||||
if (ss_string != NULL)
|
||||
sectorSize = strtoul(ss_string, NULL, 0);
|
||||
|
||||
const char *bs_string = get_driver_parameter(handle, "block_size",
|
||||
const char* bs_string = get_driver_parameter(handle, "block_size",
|
||||
NULL, NULL);
|
||||
uint32 blockSize = max_c(16384, B_PAGE_SIZE);
|
||||
if (bs_string != NULL)
|
||||
|
||||
Reference in New Issue
Block a user