summaryrefslogtreecommitdiffstats
path: root/src/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 2a15b70..e32cc1b 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -29,7 +29,7 @@
#include "macro.h"
char *ca_sprintf_malloc(const char *format, ...) {
- int size = 100;
+ size_t size = 100;
char *c = NULL;
ca_assert(format);
@@ -49,11 +49,11 @@ char *ca_sprintf_malloc(const char *format, ...) {
c[size-1] = 0;
- if (r > -1 && r < size)
+ if (r > -1 && (size_t) r < size)
return c;
if (r > -1) /* glibc 2.1 */
- size = r+1;
+ size = (size_t) r+1;
else /* glibc 2.0 */
size *= 2;
}