summaryrefslogtreecommitdiffstats
path: root/misc-utils/logger.c
diff options
context:
space:
mode:
authorSami Kerola2019-02-09 10:34:52 +0100
committerKarel Zak2019-02-18 13:19:24 +0100
commit4813a5210f6fb979d8f7a592f71a2f9c4d3db179 (patch)
tree90f4aafc604b9a676c0f614281076d8ab52686da /misc-utils/logger.c
parentcal: fix Sexit and Senter (diff)
downloadkernel-qcow2-util-linux-4813a5210f6fb979d8f7a592f71a2f9c4d3db179.tar.gz
kernel-qcow2-util-linux-4813a5210f6fb979d8f7a592f71a2f9c4d3db179.tar.xz
kernel-qcow2-util-linux-4813a5210f6fb979d8f7a592f71a2f9c4d3db179.zip
various: fix 'uninitialized when used' warnings [clang]
This change fixes "warning: variable 'var' may be uninitialized when used here [-Wconditional-uninitialized]" warnings reported in various files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/logger.c')
-rw-r--r--misc-utils/logger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index 10b307ef9..394a477db 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -237,7 +237,7 @@ static int pencode(char *s)
static int unix_socket(struct logger_ctl *ctl, const char *path, int *socket_type)
{
- int fd, i, type = -1;
+ int fd = -1, i, type = -1;
static struct sockaddr_un s_addr; /* AF_UNIX address of local logger */
if (strlen(path) >= sizeof(s_addr.sun_path))