提交 d13a3089 编写于 作者: A Ashwin Agrawal

Run pgindent on zstd_compression.c.

上级 647cf58c
......@@ -22,11 +22,11 @@
PG_MODULE_MAGIC;
#endif
Datum zstd_constructor(PG_FUNCTION_ARGS);
Datum zstd_destructor(PG_FUNCTION_ARGS);
Datum zstd_compress(PG_FUNCTION_ARGS);
Datum zstd_decompress(PG_FUNCTION_ARGS);
Datum zstd_validator(PG_FUNCTION_ARGS);
Datum zstd_constructor(PG_FUNCTION_ARGS);
Datum zstd_destructor(PG_FUNCTION_ARGS);
Datum zstd_compress(PG_FUNCTION_ARGS);
Datum zstd_decompress(PG_FUNCTION_ARGS);
Datum zstd_validator(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(zstd_constructor);
PG_FUNCTION_INFO_V1(zstd_destructor);
......@@ -42,7 +42,7 @@ typedef struct zstd_state
bool compress; /* Compress if true, decompress otherwise */
ZSTD_CCtx *zstd_compress_context; /* ZSTD compression context */
ZSTD_DCtx *zstd_decompress_context; /* ZSTD decompression context */
} zstd_state;
} zstd_state;
Datum
zstd_constructor(PG_FUNCTION_ARGS)
......@@ -114,11 +114,12 @@ zstd_compress(PG_FUNCTION_ARGS)
if (ZSTD_isError(dst_length_used))
{
if (ZSTD_getErrorCode(dst_length_used) == ZSTD_error_dstSize_tooSmall) {
if (ZSTD_getErrorCode(dst_length_used) == ZSTD_error_dstSize_tooSmall)
{
/*
* This error is returned when "compressed" output is bigger than
* uncompressed input.
* The caller can detect this by checking dst_used >= src_size
* uncompressed input. The caller can detect this by checking
* dst_used >= src_size
*/
dst_length_used = src_sz;
}
......@@ -169,4 +170,3 @@ zstd_validator(PG_FUNCTION_ARGS)
{
PG_RETURN_VOID();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册