From 5f08c4f76a87c4eccd6faed949f31aae4d5c24ea Mon Sep 17 00:00:00 2001 From: Jason King Date: Tue, 19 Sep 2017 15:26:45 +0000 Subject: OS-6341 bunyan_child adds keys to parent, not child --- usr/src/lib/libbunyan/common/bunyan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/src/lib/libbunyan/common') diff --git a/usr/src/lib/libbunyan/common/bunyan.c b/usr/src/lib/libbunyan/common/bunyan.c index 149702a38f..a442c33cec 100644 --- a/usr/src/lib/libbunyan/common/bunyan.c +++ b/usr/src/lib/libbunyan/common/bunyan.c @@ -559,7 +559,7 @@ bunyan_dup(const bunyan_t *b) int bunyan_child(const bunyan_logger_t *bhp, bunyan_logger_t **outp, ...) { - bunyan_t *b = (bunyan_t *)bhp; + const bunyan_t *b = (const bunyan_t *)bhp; bunyan_t *n; va_list ap; int ret; @@ -569,7 +569,7 @@ bunyan_child(const bunyan_logger_t *bhp, bunyan_logger_t **outp, ...) return (ENOMEM); va_start(ap, outp); - ret = bunyan_key_vadd(b, &ap); + ret = bunyan_key_vadd(n, &ap); va_end(ap); if (ret != 0) -- cgit v1.2.3