summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-08-31 08:28:30 (GMT)
committer Daniel Silverstone <dsilvers@digital-scurf.org>2017-08-31 08:28:30 (GMT)
commit00ea402050da45943b1cf1c11d7ac4e1ddbfa489 (patch)
treeebf3c7ffe941891842dbaafe41911d40823ec9b0
parent8904c4e51359fde76735636903bd5f6d826f193d (diff)
downloadlibnslog-00ea402050da45943b1cf1c11d7ac4e1ddbfa489.tar.gz
libnslog-00ea402050da45943b1cf1c11d7ac4e1ddbfa489.tar.bz2
Don't stomp on 'ctx' in logging macro
-rw-r--r--include/nslog/nslog.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/nslog/nslog.h b/include/nslog/nslog.h
index 045914c..0288f5d 100644
--- a/include/nslog/nslog.h
+++ b/include/nslog/nslog.h
@@ -173,7 +173,7 @@ typedef struct nslog_entry_context_s {
#define NSLOG(catname, level, logmsg, args...) \
do { \
if (NSLOG_LEVEL_##level >= NSLOG_COMPILED_MIN_LEVEL) { \
- static nslog_entry_context_t ctx = { \
+ static nslog_entry_context_t _nslog_ctx = { \
&__nslog_category_##catname, \
NSLOG_LEVEL_##level, \
__FILE__, \
@@ -182,7 +182,7 @@ typedef struct nslog_entry_context_s {
sizeof(__PRETTY_FUNCTION__) - 1, \
__LINE__, \
}; \
- nslog__log(&ctx, logmsg, ##args); \
+ nslog__log(&_nslog_ctx, logmsg, ##args); \
} \
} while(0)