summaryrefslogtreecommitdiffstats
path: root/src/malloc.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-08-14 19:09:33 +0200
committerLennart Poettering <lennart@poettering.net>2008-08-14 19:09:33 +0200
commitf059c857b202a2428b1b4757de2d3d9f23fdf9a3 (patch)
tree7298fdb125cfbb1543616cd46b63442d50a3f4ba /src/malloc.c
parent876bbf8c2f3ea26e6553a431f5042cd9d2c99723 (diff)
enable a few additional gcc warnings and fix all problems found
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;
}