]> git.tuebingen.mpg.de Git - dss.git/blobdiff - string.c
Make the dss log facility C89 conform.
[dss.git] / string.c
index 22d39056e8cbf6169914c25c58b6eb56b45f9cdf..bb82adcbb5e310e539226436d9649ca4a6964f0b 100644 (file)
--- a/string.c
+++ b/string.c
@@ -72,8 +72,8 @@ __must_check __malloc void *dss_realloc(void *p, size_t size)
         */
        assert(size);
        if (!(p = realloc(p, size))) {
-               DSS_EMERG_LOG("realloc failed (size = %zu), aborting\n",
-                       size);
+               DSS_EMERG_LOG(("realloc failed (size = %zu), aborting\n",
+                       size));
                exit(EXIT_FAILURE);
        }
        return p;
@@ -93,12 +93,13 @@ __must_check __malloc void *dss_realloc(void *p, size_t size)
  */
 __must_check __malloc void *dss_malloc(size_t size)
 {
+       void *p;
        assert(size);
-       void *p = malloc(size);
+       p = malloc(size);
 
        if (!p) {
-               DSS_EMERG_LOG("malloc failed (size = %zu),  aborting\n",
-                       size);
+               DSS_EMERG_LOG(("malloc failed (size = %zu),  aborting\n",
+                       size));
                exit(EXIT_FAILURE);
        }
        return p;
@@ -144,7 +145,7 @@ __must_check __malloc char *dss_strdup(const char *s)
 
        if ((ret = strdup(s? s: "")))
                return ret;
-       DSS_EMERG_LOG("strdup failed, aborting\n");
+       DSS_EMERG_LOG(("strdup failed, aborting\n"));
        exit(EXIT_FAILURE);
 }