Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions strbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>

#include "strbuf.h"

Expand Down Expand Up @@ -94,8 +96,8 @@ void strbuf_set_increment(strbuf_t *s, int increment)
static inline void debug_stats(strbuf_t *s)
{
if (s->debug) {
fprintf(stderr, "strbuf(%lx) reallocs: %d, length: %d, size: %d\n",
(long)s, s->reallocs, s->length, s->size);
fprintf(stderr, "strbuf(%" PRIxPTR ") reallocs: %d, length: %d, size: %d\n",
(uintptr_t)s, s->reallocs, s->length, s->size);
}
}

Expand Down Expand Up @@ -168,8 +170,8 @@ void strbuf_resize(strbuf_t *s, int len)
newsize = calculate_new_size(s, len);

if (s->debug > 1) {
fprintf(stderr, "strbuf(%lx) resize: %d => %d\n",
(long)s, s->size, newsize);
fprintf(stderr, "strbuf(%" PRIxPTR ") resize: %d => %d\n",
(uintptr_t)s, s->size, newsize);
}

s->size = newsize;
Expand Down