diff options
author | Monsta <[email protected]> | 2014-11-15 12:06:31 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-15 23:14:18 +0100 |
commit | 0b62f8fee90654744ad19127cca58017f7a44d78 (patch) | |
tree | 593d4e91296be23f8c16335848084bf09b890ebd /logview/logview-utils.c | |
parent | 6d8460ae879f11bbe5cdd4eccf08f7095d92bb5b (diff) | |
download | mate-utils-0b62f8fee90654744ad19127cca58017f7a44d78.tar.bz2 mate-utils-0b62f8fee90654744ad19127cca58017f7a44d78.tar.xz |
properly NULL-init some vars to avoid logic flaws later
Diffstat (limited to 'logview/logview-utils.c')
-rw-r--r-- | logview/logview-utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/logview/logview-utils.c b/logview/logview-utils.c index 3a1e2d07..2b38dc85 100644 --- a/logview/logview-utils.c +++ b/logview/logview-utils.c @@ -140,9 +140,9 @@ log_read_dates (const char **buffer_lines, time_t current) { int current_year, offsetyear, i, n, rangemin, rangemax, timestamp_len = 0; GSList *days = NULL; - GDate *date, *newdate; + GDate *date = NULL; struct tm *tmptm; - char *date_string; + char *date_string = NULL; Day *day; gboolean done = FALSE; @@ -226,7 +226,7 @@ log_read_dates (const char **buffer_lines, time_t current) /* this means we finished the current day but we're not at the end * of the buffer: reset the parameters for the next day. */ - newdate = NULL; + GDate *newdate = NULL; for (i = day->last_line + 1; buffer_lines[i]; i++) { if ((newdate = string_get_date (buffer_lines[i], &date_string, ×tamp_len)) != NULL) |