X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fgraph.c;h=5dfbb72eb9824140f9267e9e3d39abe4d7c28244;hp=9dd3fa5df7e94537ed80a94fdebf672f9784f53c;hb=e9576632dc4b780b867044269d06cc50f76d8c05;hpb=8b55dfacb199d152391aa5f7adbbbe35bceea7d7 diff --git a/src/graph.c b/src/graph.c index 9dd3fa5d..5dfbb72e 100644 --- a/src/graph.c +++ b/src/graph.c @@ -1,6 +1,6 @@ /* graph.c -- graph algorithms - Copyright (C) 2001-2006 Guus Sliepen , + Copyright (C) 2001-2007 Guus Sliepen , 2001-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify @@ -101,7 +101,7 @@ void mst_kruskal(void) /* Starting point */ - for(node = edge_weight_tree->head; node; node = next) { + for(node = edge_weight_tree->head; node; node = node->next) { e = node->data; if(e->from->status.reachable) { e->from->status.visited = true; @@ -374,6 +374,9 @@ void dump_graph(void) pclose(file); } else { fclose(file); +#ifdef HAVE_MINGW + unlink(filename); +#endif rename(tmpname, filename); free(tmpname); }