diff options
author | Karel Zak | 2013-07-09 14:45:41 +0200 |
---|---|---|
committer | Karel Zak | 2013-07-09 14:45:41 +0200 |
commit | 57a24292ff88569f6771f6dafbcf172b88dd431a (patch) | |
tree | a0218633ef48e939dfed0da8d202e0a7c79dfce3 /misc-utils/uuidd.c | |
parent | libmount: fix memory leak [clang-analyzer] (diff) | |
download | kernel-qcow2-util-linux-57a24292ff88569f6771f6dafbcf172b88dd431a.tar.gz kernel-qcow2-util-linux-57a24292ff88569f6771f6dafbcf172b88dd431a.tar.xz kernel-qcow2-util-linux-57a24292ff88569f6771f6dafbcf172b88dd431a.zip |
uuidd: add missing initializer [clang-analyzer]
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/uuidd.c')
-rw-r--r-- | misc-utils/uuidd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index d0ecb953c..d381eea9e 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -480,7 +480,7 @@ int main(int argc, char **argv) const char *socket_path = UUIDD_SOCKET_PATH; const char *pidfile_path = NULL; const char *pidfile_path_param = NULL; - const char *err_context; + const char *err_context = NULL; char buf[1024], *cp; char str[UUID_STR_LEN]; uuid_t uu; @@ -592,7 +592,7 @@ int main(int argc, char **argv) sizeof(buf), &num, &err_context); if (ret < 0) err(EXIT_FAILURE, _("error calling uuidd daemon (%s)"), - err_context); + err_context ? : _("unexpected error")); if (do_type == UUIDD_OP_TIME_UUID) { if (ret != sizeof(uu) + sizeof(num)) @@ -620,7 +620,7 @@ int main(int argc, char **argv) sizeof(uu), 0, &err_context); if (ret < 0) err(EXIT_FAILURE, _("error calling uuidd daemon (%s)"), - err_context); + err_context ? : _("unexpected error")); if (ret != sizeof(uu)) unexpected_size(ret); |