X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fxmalloc.c;h=b49d399d450ca23da3be708c51549756da1bae5d;hp=704207982c52f832e7607adba3b85c0dbfe8d8ac;hb=2715f6522ca62ab5dbc886c21ed18945743216f0;hpb=29b3b3213c4c8ad38bab054b56f8b70f1b14d67a diff --git a/src/xmalloc.c b/src/xmalloc.c index 7042079..b49d399 100644 --- a/src/xmalloc.c +++ b/src/xmalloc.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ /** @@ -260,12 +260,12 @@ void *xrealloc_f(void *o, size_t size, const char *file, int line) } if (log_level) - yaz_log (log_level, - "%s:%d: xrealloc(s=%ld) %p -> %p", file, line, (long) size, o, p); + yaz_log(log_level, + "%s:%d: xrealloc(s=%ld) %p -> %p", file, line, (long) size, o, p); if (!p) { - yaz_log (YLOG_FATAL|YLOG_ERRNO, "Out of memory, realloc (%ld bytes)", - (long) size); + yaz_log(YLOG_FATAL|YLOG_ERRNO, "Out of memory, realloc (%ld bytes)", + (long) size); xmalloc_fatal(); } return p; @@ -348,7 +348,7 @@ char *xstrndup_f(const char *s, size_t n, const char *file, int line) if (l < n) return xstrdup_f(s, file, line); { - char *a = xmalloc_f(n+1, file, line); + char *a = (char*) xmalloc_f(n+1, file, line); memcpy(a, s, n); a[n] = '\0'; return a;