From: Karel Zak Date: Mon, 26 Jun 2023 09:56:23 +0000 (+0200) Subject: logger: initialize socket credentials contol union X-Git-Tag: v2.40-rc1~366 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a4d70419c97f64f60c0eda4720e64d17b3b0714;p=thirdparty%2Futil-linux.git logger: initialize socket credentials contol union Addresses: https://github.com/util-linux/util-linux/issues/2336 Signed-off-by: Karel Zak --- diff --git a/misc-utils/logger.c b/misc-utils/logger.c index e2b0b41abe..8174d55e0f 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -471,7 +471,7 @@ static void write_output(struct logger_ctl *ctl, const char *const msg) union { struct cmsghdr cmh; char control[CMSG_SPACE(sizeof(struct ucred))]; - } cbuf; + } cbuf = { .control = { 0 } }; #endif /* 4) add extra \n to make sure message is terminated */