From: Michael Stapelberg Date: Wed, 22 Sep 2010 22:20:16 +0000 (+0200) Subject: initialize result to NULL to shun compiler warning X-Git-Tag: 2.2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=862297ecada056bce29eb603fc6f5e35471409f1;p=i3%2Fi3status initialize result to NULL to shun compiler warning --- diff --git a/i3status.c b/i3status.c index 1b05196..6d6fbc7 100644 --- a/i3status.c +++ b/i3status.c @@ -93,7 +93,7 @@ static int valid_color(const char *value) */ static char *resolve_tilde(const char *path) { static glob_t globbuf; - char *head, *tail, *result; + char *head, *tail, *result = NULL; tail = strchr(path, '/'); head = strndup(path, tail ? (size_t)(tail - path) : strlen(path));