Skip to content

Commit

Permalink
reformatted using clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
baekrang256 authored Apr 23, 2024
1 parent b0649c1 commit 29b3727
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ uint32_t simplefs_ext_search(struct simplefs_file_ei_block *index,
{
/* first, find the first unused file index with binary search.
* It'll be our right boundary for actual binary search
* and return value when file index is not found.
* and return value when file index is not found.
*/
uint32_t start = 0;
uint32_t end = SIMPLEFS_MAX_EXTENTS - 1;
Expand All @@ -30,8 +30,7 @@ uint32_t simplefs_ext_search(struct simplefs_file_ei_block *index,
}
}

if (end != SIMPLEFS_MAX_EXTENTS - 1 ||
index->extents[end].ee_start == 0) {
if (end != SIMPLEFS_MAX_EXTENTS - 1 || index->extents[end].ee_start == 0) {
boundary = end;
}

Expand All @@ -45,8 +44,7 @@ uint32_t simplefs_ext_search(struct simplefs_file_ei_block *index,
if (iblock >= block && iblock < block + len) {
/* found before search finished */
return mid;
}
else if (iblock < block) {
} else if (iblock < block) {
end = mid;
} else {
start = mid + 1;
Expand All @@ -62,4 +60,4 @@ uint32_t simplefs_ext_search(struct simplefs_file_ei_block *index,
} else {
return boundary;
}
}
}

0 comments on commit 29b3727

Please sign in to comment.