Skip to content

Commit 1155b7c

Browse files
committed
consistency
1 parent 1a6ee0a commit 1155b7c

4 files changed

Lines changed: 191 additions & 94 deletions

File tree

include/utils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
FILE *xfopen(const char *path, const char *mode);
2626

2727
/*
28-
* Round 'size' up to the nearest multiple of 'align'.
28+
* Compute the number of padding bytes required to align 'n' to the next
29+
* 4-byte boundary.
2930
*/
30-
size_t pad_size(size_t size, size_t align);
31+
uint32_t pad4(uint32_t n);
3132

3233
/*
3334
* strdup replacement using malloc.

src/lz10.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ uint8_t *lz10_decompress(const uint8_t *src, size_t srcSize, size_t *outSize) {
3737

3838
uint8_t *dst = malloc(decSize);
3939
if (!dst) {
40-
fprintf(stderr, "lz10_decompress: allocation failed (%u bytes)\n",
40+
fprintf(stderr,
41+
"lz10_decompress: memory allocation failed (%u bytes)\n",
4142
decSize);
4243
return NULL;
4344
}
@@ -141,7 +142,7 @@ uint8_t *lz10_compress(const uint8_t *src, size_t srcSize, size_t *outSize) {
141142

142143
uint8_t *out = calloc(maxSize, 1);
143144
if (!out) {
144-
fprintf(stderr, "lz10_compress: allocation failed\n");
145+
fprintf(stderr, "lz10_compress: memory allocation failed\n");
145146
return NULL;
146147
}
147148

0 commit comments

Comments
 (0)