edge_weight_compare() shouldn't rely on edge_compare().
[tinc] / lib / utils.c
index be3126d..ce78dd2 100644 (file)
@@ -1,7 +1,7 @@
 /*
     utils.c -- gathering of some stupid small functions
-    Copyright (C) 1999,2000 Ivo Timmermans <zarq@iname.com>
-                       2000 Guus Sliepen <guus@sliepen.warande.net>
+    Copyright (C) 1999-2001 Ivo Timmermans <zarq@iname.com>
+                  2000,2001 Guus Sliepen <guus@sliepen.eu.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@
 #include <sys/types.h>
 #include <ctype.h>
 #include <string.h>
-#include <stdarg.h>
 
 #include "config.h"
 
@@ -86,32 +85,3 @@ void cp_trace()
         );
 }
 #endif
-
-#ifndef HAVE_ASPRINTF
-int asprintf(char **buf, const char *fmt, ...)
-{
-  int status;
-  va_list ap;
-  int len;
-  
-  len = 4096;
-  *buf = xmalloc(len);
-
-  va_start(ap, fmt);
-  status = vsnprintf (*buf, len, fmt, ap);
-  va_end (ap);
-
-  if(status >= 0)
-    *buf = xrealloc(*buf, status);
-
-  if(status > len-1)
-    {
-      len = status;
-      va_start(ap, fmt);
-      status = vsnprintf (*buf, len, fmt, ap);
-      va_end (ap);
-    }
-
-  return status;
-}
-#endif