Code

win32 portability patch and win32/rrdlib.vcproj file for the source
[rrdtool.git] / src / rrd_first.c
index d2b81a958bac38e86ab7565205ae617f4af2d86b..4fb4a4ef10c08e670d521fb193c12d91de9ef597 100644 (file)
@@ -1,11 +1,12 @@
 /*****************************************************************************
- * RRDtool 1.2.23  Copyright by Tobi Oetiker, 1997-2007
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_first Return
  *****************************************************************************
  * Initial version by Burton Strauss, ntopSupport.com - 3/2005
  *****************************************************************************/
 
+#include <stdlib.h>
 #include "rrd_tool.h"
 
 
@@ -65,6 +66,7 @@ time_t rrd_first_r(
     rrd_t     rrd;
     rrd_file_t *rrd_file;
 
+    rrd_init(&rrd);
     rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
     if (rrd_file == NULL) {
         goto err_free;