X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fmempool-str.c;h=1072e3dacb7fde29a0deceef692d77732478b6fa;hb=a7b91de90e7c0a8b6aded23913bd80f47e0bcdc9;hp=9391cbb6eb1db3b8739d74ed364a5a619c7c71bb;hpb=8f5f490eafa86470c6ab1285d13f8f300d53b227;p=libucw.git diff --git a/ucw/mempool-str.c b/ucw/mempool-str.c index 9391cbb6..1072e3da 100644 --- a/ucw/mempool-str.c +++ b/ucw/mempool-str.c @@ -18,14 +18,14 @@ mp_strdup(struct mempool *p, const char *s) { if (!s) return NULL; - uns l = strlen(s) + 1; + size_t l = strlen(s) + 1; char *t = mp_alloc_fast_noalign(p, l); memcpy(t, s, l); return t; } void * -mp_memdup(struct mempool *p, const void *s, uns len) +mp_memdup(struct mempool *p, const void *s, size_t len) { void *t = mp_alloc_fast(p, len); memcpy(t, s, len); @@ -38,12 +38,12 @@ mp_multicat(struct mempool *p, ...) va_list args, a; va_start(args, p); char *x, *y; - uns cnt = 0; + uint cnt = 0; va_copy(a, args); while (x = va_arg(a, char *)) cnt++; - uns *sizes = alloca(cnt * sizeof(uns)); - uns len = 1; + size_t *sizes = alloca(cnt * sizeof(*sizes)); + size_t len = 1; cnt = 0; va_end(a); va_copy(a, args); @@ -64,17 +64,17 @@ mp_multicat(struct mempool *p, ...) } char * -mp_strjoin(struct mempool *p, char **a, uns n, uns sep) +mp_strjoin(struct mempool *p, char **a, uint n, uint sep) { - uns sizes[n]; - uns len = 1; - for (uns i=0; i