diff --git a/extent.c b/extent.c index ae5381a..7218918 100644 --- a/extent.c +++ b/extent.c @@ -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; @@ -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; } @@ -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; @@ -62,4 +60,4 @@ uint32_t simplefs_ext_search(struct simplefs_file_ei_block *index, } else { return boundary; } -} \ No newline at end of file +}