Fix The left operand of '!=' is a garbage value issue found by Clang Analyzer
authorAlexis La Goutte <alexis.lagoutte@gmail.com>
Sun, 21 Dec 2014 19:15:47 +0000 (20:15 +0100)
committerAnders Broman <a.broman58@gmail.com>
Mon, 22 Dec 2014 07:38:57 +0000 (07:38 +0000)
Change-Id: Ia555fc8eca2a7288c159983578cbc88dc0bebbc2
Reviewed-on: https://code.wireshark.org/review/5952
Reviewed-by: Anders Broman <a.broman58@gmail.com>
file.c
mergecap.c

diff --git a/file.c b/file.c
index acbe1857952bc59b370b9b433391c4119ad02840..e2510617a209a493d0a4240ee8b73a7109859529 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1249,7 +1249,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
   int              out_fd;
   wtap_dumper     *pdh;
   int              open_err, read_err, write_err, close_err;
-  gchar           *err_info, *write_err_info;
+  gchar           *err_info, *write_err_info = NULL;
   int              err_fileno;
   int              i;
   gboolean         got_read_error     = FALSE, got_write_error = FALSE;
index 7bcada4f996a42806c5a16962aa822f4a0a48996..c483e8feefa6614b4bb9f4ec7596055d5ae8bef6 100644 (file)
@@ -254,7 +254,7 @@ main(int argc, char *argv[])
   struct wtap_pkthdr *phdr, snap_phdr;
   wtap_dumper        *pdh;
   int                 open_err, read_err = 0, write_err, close_err;
-  gchar              *err_info, *write_err_info;
+  gchar              *err_info, *write_err_info = NULL;
   int                 err_fileno;
   char               *out_filename       = NULL;
   gboolean            got_read_error     = FALSE, got_write_error = FALSE;