summaryrefslogtreecommitdiff
path: root/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'log.h')
-rw-r--r--log.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/log.h b/log.h
index 4fbc470..b8d90d3 100644
--- a/log.h
+++ b/log.h
@@ -63,11 +63,9 @@ class cLogFile: public cFile
char timebuf[25];
strftime(timebuf, sizeof(timebuf), "%T", localtime_r(&now, &tm_r));
- char* log = NULL;
- asprintf(&log, "%s %s: %s\n", datebuf, timebuf, buffer);
+ cString log = cString::sprintf("%s %s: %s\n", datebuf, timebuf, buffer);
free(buffer);
safe_write(*this, log, strlen(log));
- free(log);
}
}
void eSysLog(const char *text, ...)