From faf892114d4fa54bb1e4da1a41ccd749530a553c Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 19 Mar 2011 11:55:47 +0100 Subject: [PATCH] getdata.c: initialize variables to have safe values Primarily to get rid of following warning. getdata.c:63:26: warning: 'macstring' may be used uninitialized in this function getdata.c:66:20: warning: 'macaddr_p' may be used uninitialized in this function Signed-off-by: Sami Kerola --- src/getdata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/getdata.c b/src/getdata.c index fe513ae..7fbe4d0 100644 --- a/src/getdata.c +++ b/src/getdata.c @@ -60,10 +60,10 @@ extern char *malloc(); int parse_leases(void) { FILE *dhcpd_leases; - char *line, *ipstring, *macstring; + char *line, *ipstring, *macstring = NULL; struct in_addr inp; struct stat lease_file_stats; - struct macaddr_t *macaddr_p; + struct macaddr_t *macaddr_p = NULL; unsigned long leasesmallocsize; unsigned long touchesmallocsize; unsigned long backupsmallocsize; -- 1.7.10.4