summaryrefslogtreecommitdiff
path: root/str.c
diff options
context:
space:
mode:
authorAndre Noll <maan@tuebingen.mpg.de>2024-10-23 18:45:30 +0200
committerAndre Noll <maan@tuebingen.mpg.de>2025-03-23 19:13:50 +0100
commit07b73ad8272084b706d18ee2286bf25711dbaabb (patch)
treec79ef9a311120433f4ebe72dbbaa492bab449c19 /str.c
parent5770e00c6e59528762be20610af6d8bd24d6872f (diff)
Switch back to variadic log macros.HEADpumaster
This essentially reverts commit 66cdd5bc99a5 which aimed to make the dss log facility C89 conform. While this was a worthwhile goal in 2012, it has little value today, since in 2025 we can safely assume a C99 compliant compiler. The patch was created with git revert -Xours 66cdd5bc followed by manual tweaks to make it compile again.
Diffstat (limited to 'str.c')
-rw-r--r--str.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/str.c b/str.c
index ed04e47..f507379 100644
--- a/str.c
+++ b/str.c
@@ -29,8 +29,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;
@@ -44,8 +44,8 @@ __must_check __malloc void *dss_malloc(size_t 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;
@@ -70,7 +70,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);
}
@@ -113,7 +113,7 @@ __must_check __malloc char *get_homedir(void)
const char *home = getenv("HOME");
if (home && *home)
return dss_strdup(home);
- DSS_EMERG_LOG(("fatal: HOME is unset or empty\n"));
+ DSS_EMERG_LOG("fatal: HOME is unset or empty\n");
exit(EXIT_FAILURE);
}