From: Guus Sliepen Date: Thu, 31 Jan 2013 15:03:24 +0000 (+0100) Subject: Fix a compiler warning. X-Git-Tag: release-1.0.20~5 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=b47fbb8c5be20000f504e9e65d8ef0376ae92ff9;p=tinc Fix a compiler warning. --- diff --git a/src/graph.c b/src/graph.c index 586aee8b..cca09350 100644 --- a/src/graph.c +++ b/src/graph.c @@ -318,7 +318,7 @@ void dump_graph(void) { node_t *n; edge_t *e; char *filename = NULL, *tmpname = NULL; - FILE *file, *pipe; + FILE *file, *pipe = NULL; if(!graph_changed || !get_config_string(lookup_config(config_tree, "GraphDumpFile"), &filename)) return; @@ -356,7 +356,7 @@ void dump_graph(void) { fprintf(file, "}\n"); - if(filename[0] == '|') { + if(pipe) { pclose(pipe); } else { fclose(file);