diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-08-31 09:28:30 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-08-31 09:28:30 +0100 |
commit | 00ea402050da45943b1cf1c11d7ac4e1ddbfa489 (patch) | |
tree | ebf3c7ffe941891842dbaafe41911d40823ec9b0 /include/nslog/nslog.h | |
parent | 8904c4e51359fde76735636903bd5f6d826f193d (diff) | |
download | libnslog-00ea402050da45943b1cf1c11d7ac4e1ddbfa489.tar.gz libnslog-00ea402050da45943b1cf1c11d7ac4e1ddbfa489.tar.bz2 |
Don't stomp on 'ctx' in logging macro
Diffstat (limited to 'include/nslog/nslog.h')
-rw-r--r-- | include/nslog/nslog.h | 4 |
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) |