summaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
authornicm <nicm>2019-09-24 20:44:58 +0000
committernicm <nicm>2019-09-24 20:44:58 +0000
commite3359f8349cf972052604c089b5bab71f5e33095 (patch)
tree1604049179d85325334658c5447d0e1875a806ee /log.c
parente8adcae0f24c6089cae9c60e7b087a00a582f9f9 (diff)
Some minor performance improvements - most notably, don't search the
input state table if the next character matches the same state as before.
Diffstat (limited to 'log.c')
-rw-r--r--log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/log.c b/log.c
index c002663e..44b24c67 100644
--- a/log.c
+++ b/log.c
@@ -131,6 +131,9 @@ log_debug(const char *msg, ...)
{
va_list ap;
+ if (log_file == NULL)
+ return;
+
va_start(ap, msg);
log_vwrite(msg, ap);
va_end(ap);