summaryrefslogtreecommitdiffstats
path: root/lib/buffer.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2012-07-30 09:19:06 +0200
committerMiloslav Trmač <mitr@redhat.com>2012-07-30 09:20:43 +0200
commit5936ab0875cf9a3e5cec59babee45a9016e0e271 (patch)
tree2c3c371aac8c44f14672ecaf8889933a11b6b92a /lib/buffer.c
parent059c0d3c409ac43bacf99233bdacb4840cb7afe8 (diff)
downloadlibumberlog-5936ab0875cf9a3e5cec59babee45a9016e0e271.tar.gz
libumberlog-5936ab0875cf9a3e5cec59babee45a9016e0e271.tar.xz
libumberlog-5936ab0875cf9a3e5cec59babee45a9016e0e271.zip
Add an explicit cast to avoid a warning
... with -Wsign-compare. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'lib/buffer.c')
-rw-r--r--lib/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/buffer.c b/lib/buffer.c
index cdb494c..79c18fd 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -54,7 +54,7 @@ _ul_buffer_realloc_to_reserve (ul_buffer_t *buffer, size_t size)
static inline int
_ul_buffer_reserve_size (ul_buffer_t *buffer, size_t size)
{
- if (buffer->alloc_end - buffer->ptr < size)
+ if ((size_t)(buffer->alloc_end - buffer->ptr) < size)
return _ul_buffer_realloc_to_reserve (buffer, size);
return 0;
}