summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9f99c0)
raw | patch | inline | side by side (parent: a9f99c0)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 20 Apr 2014 12:10:03 +0000 (14:10 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 20 Apr 2014 12:10:03 +0000 (14:10 +0200) |
Check the length of the list rather than replying on it being uninitialized.
src/core/plugin.c | patch | blob | history |
diff --git a/src/core/plugin.c b/src/core/plugin.c
index 7584aa54d273bf0fce16ad7dd81f593a4e3ac7f0..188c7db1515859739efff2c456bd00c62f893f98 100644 (file)
--- a/src/core/plugin.c
+++ b/src/core/plugin.c
if (! msg)
return 0;
- if (! log_list)
+ if (! sdb_llist_len(log_list))
return fprintf(stderr, "[%s] %s\n", SDB_LOG_PRIO_TO_STRING(prio), msg);
iter = sdb_llist_get_iter(log_list);