mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
cstyle: Resolve C style issues
The vast majority of these changes are in Linux specific code. They are the result of not having an automated style checker to validate the code when it was originally written. Others were caused when the common code was slightly adjusted for Linux. This patch contains no functional changes. It only refreshes the code to conform to style guide. Everyone submitting patches for inclusion upstream should now run 'make checkstyle' and resolve any warning prior to opening a pull request. The automated builders have been updated to fail a build if when 'make checkstyle' detects an issue. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1821
This commit is contained in:
committed by
Brian Behlendorf
parent
8ffef572ed
commit
d1d7e2689d
+9
-8
@@ -47,7 +47,8 @@ static kmem_cache_t *lz4_cache;
|
||||
|
||||
/*ARGSUSED*/
|
||||
size_t
|
||||
lz4_compress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
|
||||
lz4_compress_zfs(void *s_start, void *d_start, size_t s_len,
|
||||
size_t d_len, int n)
|
||||
{
|
||||
uint32_t bufsiz;
|
||||
char *dest = d_start;
|
||||
@@ -74,7 +75,8 @@ lz4_compress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
|
||||
lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len,
|
||||
size_t d_len, int n)
|
||||
{
|
||||
const char *src = s_start;
|
||||
uint32_t bufsiz = BE_IN32(src);
|
||||
@@ -143,16 +145,16 @@ lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int
|
||||
* This function explicitly handles the CTX memory structure.
|
||||
*
|
||||
* ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated
|
||||
* by the caller (either on the stack or using kmem_cache_alloc). Passing NULL
|
||||
* isn't valid.
|
||||
* by the caller (either on the stack or using kmem_cache_alloc). Passing
|
||||
* NULL isn't valid.
|
||||
*
|
||||
* LZ4_compress64kCtx() :
|
||||
* Same as LZ4_compressCtx(), but specific to small inputs (<64KB).
|
||||
* isize *Must* be <64KB, otherwise the output will be corrupted.
|
||||
*
|
||||
* ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated
|
||||
* by the caller (either on the stack or using kmem_cache_alloc). Passing NULL
|
||||
* isn't valid.
|
||||
* by the caller (either on the stack or using kmem_cache_alloc). Passing
|
||||
* NULL isn't valid.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -267,7 +269,7 @@ lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int
|
||||
#define unlikely(expr) expect((expr) != 0, 0)
|
||||
#endif
|
||||
|
||||
#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \
|
||||
#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \
|
||||
(((x) & 0xffu) << 8)))
|
||||
|
||||
/* Basic types */
|
||||
@@ -1009,4 +1011,3 @@ lz4_fini(void)
|
||||
lz4_cache = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user