From 00bada9c5eb803c13a6b930e79684a470cf94278 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 15 Feb 2008 03:18:42 +0000 Subject: [PATCH] windows-osilog-savestring-20080214 LICENSE MIT When osi_Log is disabled, osi_LogSaveString will no longer copy the provided string into the circular log buffer. This saves a huge amount of time. --- src/WINNT/client_osi/osilog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/WINNT/client_osi/osilog.c b/src/WINNT/client_osi/osilog.c index 81a8ca54b7..8d4d566865 100644 --- a/src/WINNT/client_osi/osilog.c +++ b/src/WINNT/client_osi/osilog.c @@ -255,6 +255,10 @@ char *osi_LogSaveString(osi_log_t *logp, char *s) { char *saveplace; + if (!logp) return s; + + if (!logp->enabled) return s; + if (s == NULL) return NULL; thrd_EnterCrit(&logp->cs);