Skip to content

Commit

Permalink
chores: clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Jun 27, 2023
1 parent e47efb4 commit a729600
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 31 deletions.
6 changes: 4 additions & 2 deletions include/sqsh_archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ uint32_t sqsh_superblock_inode_count(const struct SqshSuperblock *context);
* @memberof SqshSuperblock
* @brief Retrieves the major version of an archive.
*
* @param[in] superblock The superblock context to retrieve the major version from.
* @param[in] superblock The superblock context to retrieve the major version
* from.
*
* @return The major version of this archive.
*/
Expand All @@ -201,7 +202,8 @@ uint16_t sqsh_superblock_version_major(const struct SqshSuperblock *superblock);
* @memberof SqshSuperblock
* @brief Retrieves the minor version of an archive.
*
* @param[in] superblock The superblock context to retrieve the minor version from.
* @param[in] superblock The superblock context to retrieve the minor version
* from.
*
* @return The minor version of this archive.
*/
Expand Down
8 changes: 4 additions & 4 deletions include/sqsh_chrome.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ struct SqshInode;
*/

/**
* @memberof SqshArchive
* @brief opens a sqsh archive.
* @memberof SqshArchive
* @brief opens a sqsh archive.
*
* @param[in] path The path to the sqsh archive.
*
Expand All @@ -62,8 +62,8 @@ struct SqshInode;
struct SqshArchive *sqsh_archive_open(const char *path);

/**
* @memberof SqshArchive
* @brief closes a sqsh archive.
* @memberof SqshArchive
* @brief closes a sqsh archive.
*
* @param[in] archive The sqsh archive context.
*
Expand Down
3 changes: 1 addition & 2 deletions include/sqsh_mapper_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,12 @@ size_t sqsh__map_manager_block_count(const struct SqshMapManager *manager);
*
* @param[in] manager The SqshMapManager instance.
* @param[in] index The index of the chunk to map.
* @param[in] span The number of chunks to map.
* @param[out] target The mapping to store the result in.
*
* @return Returns 0 on success, a negative value on error.
*/
SQSH_NO_UNUSED int sqsh__map_manager_get(
struct SqshMapManager *manager, sqsh_index_t index, int span,
struct SqshMapManager *manager, sqsh_index_t index,
const struct SqshMapSlice **target);

/**
Expand Down
4 changes: 2 additions & 2 deletions include/sqsh_primitive_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ bool sqsh__rc_map_is_empty(struct SqshRcMap *array, sqsh_index_t index);
* @param data The data to set.
* @return 0 on success, a negative value on error.
*/
const void *sqsh__rc_map_set(
struct SqshRcMap *array, sqsh_index_t index, void *data);
const void *
sqsh__rc_map_set(struct SqshRcMap *array, sqsh_index_t index, void *data);

/**
* @internal
Expand Down
6 changes: 4 additions & 2 deletions lib/archive/archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ sqsh__archive_init(
goto out;
}

uint16_t version_minor = sqsh_superblock_version_minor(&archive->superblock);
uint16_t version_major = sqsh_superblock_version_major(&archive->superblock);
uint16_t version_minor =
sqsh_superblock_version_minor(&archive->superblock);
uint16_t version_major =
sqsh_superblock_version_major(&archive->superblock);
if (version_major != 4 && version_minor != 0) {
rv = -SQSH_ERROR_UNSUPPORTED_VERSION;
goto out;
Expand Down
3 changes: 1 addition & 2 deletions lib/primitive/rc_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ sqsh__rc_map_is_empty(struct SqshRcMap *array, sqsh_index_t index) {
}

const void *
sqsh__rc_map_set(
struct SqshRcMap *array, sqsh_index_t index, void *data) {
sqsh__rc_map_set(struct SqshRcMap *array, sqsh_index_t index, void *data) {
void *target;

target = get_element(array, index);
Expand Down
7 changes: 2 additions & 5 deletions test/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@
#define XATTR_LOOKUP_ENTRY(xattr_index, xattr_off, count, size) \
UINT64_BYTES(((xattr_index) << 16) | (xattr_off)), UINT32_BYTES(count), \
UINT32_BYTES(size)
#define XATTR_NAME_HEADER(type, size) \
UINT16_BYTES(type), UINT16_BYTES(size)
#define XATTR_VALUE_HEADER(size) \
UINT32_BYTES(size)

#define XATTR_NAME_HEADER(type, size) UINT16_BYTES(type), UINT16_BYTES(size)
#define XATTR_VALUE_HEADER(size) UINT32_BYTES(size)

#define ZLIB_ABCD \
0x78, 0x9c, 0x4b, 0x4c, 0x4a, 0x4e, 0x01, 0x00, 0x03, 0xd8, 0x01, 0x8b
Expand Down
1 change: 0 additions & 1 deletion test/include_tests/sqsh_archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_chrome.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_mapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

1 change: 0 additions & 1 deletion test/include_tests/sqsh_xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ main(int argc, char *argv[]) {
(void)argv;
return 0;
}

2 changes: 1 addition & 1 deletion test/integration.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,6 @@ TEST(sqsh_cat_datablock_and_fragment);
TEST(sqsh_cat_size_overflow);
TEST(sqsh_test_uid_and_gid);
TEST(sqsh_test_extended_dir);
//TEST(sqsh_test_xattr);
// TEST(sqsh_test_xattr);
TEST(multithreaded);
DEFINE_END

0 comments on commit a729600

Please sign in to comment.