diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 14:10:48 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 14:10:48 -0400 |
| commit | ebef00fc371123fae35f2bda91337b1d6ee6b146 (patch) | |
| tree | 8b7dfa1176caf4bb8561ba957ab0cfb529def497 | |
| parent | ff499f62999c93844c5b1ada6de61b7f04748c41 (diff) | |
Explicitly sized literals
| -rw-r--r-- | src/stdlib/print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/print.c b/src/stdlib/print.c index 219c8647..793e1925 100644 --- a/src/stdlib/print.c +++ b/src/stdlib/print.c @@ -56,7 +56,7 @@ int _print_quoted(FILE *f, quoted_t quoted) static ssize_t _gc_stream_write(void *cookie, const char *buf, size_t size) { gc_stream_t *stream = (gc_stream_t *)cookie; if (stream->position + size + 1 > *stream->size) - *stream->buffer = GC_REALLOC(*stream->buffer, (*stream->size += MAX(MAX(16, *stream->size/2), size + 1))); + *stream->buffer = GC_REALLOC(*stream->buffer, (*stream->size += MAX(MAX(16UL, *stream->size/2UL), size + 1UL))); memcpy(&(*stream->buffer)[stream->position], buf, size); stream->position += size; (*stream->buffer)[stream->position] = '\0'; @@ -79,7 +79,7 @@ int _print_quoted(FILE *f, quoted_t quoted) static int _gc_stream_write(void *cookie, const char *buf, int size) { gc_stream_t *stream = (gc_stream_t *)cookie; if (stream->position + size + 1 > *stream->size) - *stream->buffer = GC_REALLOC(*stream->buffer, (*stream->size += MAX(MAX(16, *stream->size/2), size + 1))); + *stream->buffer = GC_REALLOC(*stream->buffer, (*stream->size += MAX(MAX(16UL, *stream->size/2UL), size + 1UL))); memcpy(&(*stream->buffer)[stream->position], buf, size); stream->position += size; (*stream->buffer)[stream->position] = '\0'; |
