From 1ca3263b1febbef86071eaaa4e8eda0bbac578fa Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Wed, 20 Feb 2008 17:47:50 +0100 Subject: replaced asprintf with cString::sprintf and a wrapper function --- log.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'log.h') 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, ...) -- cgit v1.2.3