diff options
| author | Andre Noll <maan@tuebingen.mpg.de> | 2024-10-23 18:45:30 +0200 |
|---|---|---|
| committer | Andre Noll <maan@tuebingen.mpg.de> | 2025-03-23 19:13:50 +0100 |
| commit | 07b73ad8272084b706d18ee2286bf25711dbaabb (patch) | |
| tree | c79ef9a311120433f4ebe72dbbaa492bab449c19 /daemon.c | |
| parent | 5770e00c6e59528762be20610af6d8bd24d6872f (diff) | |
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 'daemon.c')
| -rw-r--r-- | daemon.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -27,7 +27,7 @@ int daemon_init(void) pid_t pid; int null, fd[2]; - DSS_INFO_LOG(("daemonizing\n")); + DSS_INFO_LOG("daemonizing\n"); if (pipe(fd) < 0) goto err; pid = fork(); @@ -46,7 +46,7 @@ int daemon_init(void) close(fd[1]); ret = read(fd[0], &c, 1); if (ret <= 0) { - DSS_EMERG_LOG(("child terminated unexpectedly\n")); + DSS_EMERG_LOG("child terminated unexpectedly\n"); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); @@ -67,7 +67,7 @@ int daemon_init(void) close(null); return fd[1]; err: - DSS_EMERG_LOG(("fatal: %s\n", strerror(errno))); + DSS_EMERG_LOG("fatal: %s\n", strerror(errno)); exit(EXIT_FAILURE); } @@ -82,8 +82,8 @@ FILE *open_log(const char *logfile_name) assert(logfile_name); logfile = fopen(logfile_name, "a"); if (!logfile) { - DSS_EMERG_LOG(("can not open %s: %s\n", logfile_name, - strerror(errno))); + DSS_EMERG_LOG("can not open %s: %s\n", logfile_name, + strerror(errno)); exit(EXIT_FAILURE); } setlinebuf(logfile); @@ -97,12 +97,12 @@ void close_log(FILE* logfile) { if (!logfile) return; - DSS_INFO_LOG(("closing logfile\n")); + DSS_INFO_LOG("closing logfile\n"); fclose(logfile); } void log_welcome(int loglevel) { - DSS_INFO_LOG(("***** welcome to dss ******\n")); - DSS_DEBUG_LOG(("using loglevel %d\n", loglevel)); + DSS_INFO_LOG("***** welcome to dss ******\n"); + DSS_DEBUG_LOG("using loglevel %d\n", loglevel); } |
