[PATCH 1/3] file.c: fix uninitialized variable

Lubomir I. Ivanov neolit123 at gmail.com
Thu Nov 27 11:55:23 PST 2014


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/file.c b/file.c
index 07774b1..d31e280 100644
--- a/file.c
+++ b/file.c
@@ -836,7 +836,7 @@ int parse_csv_file(const char *filename, int timef, int depthf, int tempf, int p
 	char unitbuf[MAXCOLDIGITS];
 	char separator_index[MAXCOLDIGITS];
 	time_t now;
-	struct tm *timep;
+	struct tm *timep = NULL;
 	char curdate[DATESTR];
 	char curtime[TIMESTR];
 
@@ -873,7 +873,7 @@ int parse_seabear_csv_file(const char *filename, int timef, int depthf, int temp
 	char unitbuf[MAXCOLDIGITS];
 	char separator_index[MAXCOLDIGITS];
 	time_t now;
-	struct tm *timep;
+	struct tm *timep = NULL;
 	char curdate[DATESTR];
 	char curtime[TIMESTR];
 	char *ptr, *ptr_old = NULL;
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list