chiark / gitweb /
site logging: Use [v]slilog_part in slog
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 11 May 2014 17:10:58 +0000 (18:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 May 2014 01:02:13 +0000 (02:02 +0100)
Eliminates a pointless log message assembly buffer.

No ultimate functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
site.c

diff --git a/site.c b/site.c
index c2dd9d2..e8dba87 100644 (file)
--- a/site.c
+++ b/site.c
@@ -324,14 +324,14 @@ FORMAT(printf,3,4);
 static void slog(struct site *st, uint32_t event, cstring_t msg, ...)
 {
     va_list ap;
-    char buf[240];
     uint32_t class;
 
     class=event_log_priority(st, event);
     if (class) {
        va_start(ap,msg);
-       vsnprintf(buf,sizeof(buf),msg,ap);
-       slilog(st->log,class,"%s: %s",st->tunname,buf);
+       slilog_part(st->log,class,"%s: ",st->tunname);
+       vslilog_part(st->log,class,msg,ap);
+       slilog_part(st->log,class,"\n");
        va_end(ap);
     }
 }