diff --git a/src/rrd_info.c b/src/rrd_info.c
index 930898797d550e3e9b5190e8d12bcc8cda0fde42..83364d20688714a006575862bd1bda413ac28f06 100644 (file)
--- a/src/rrd_info.c
+++ b/src/rrd_info.c
/*****************************************************************************
- * RRDtool 1.3.1 Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.3.8 Copyright by Tobi Oetiker, 1997-2009
*****************************************************************************
* rrd_info Get Information about the configuration of an RRD
*****************************************************************************/
#include "rrd_rpncalc.h"
#include <stdarg.h>
+#ifdef WIN32
+#include <stdlib.h>
+#endif
+
/* proto */
rrd_info_t *rrd_info(
int,
int maxlen = 1024 + strlen(fmt);
char *str = NULL;
va_list argp;
- str = malloc(sizeof(char) * (maxlen + 1));
+ str = (char*)(malloc(sizeof(char) * (maxlen + 1)));
if (str != NULL) {
va_start(argp, fmt);
#ifdef HAVE_VSNPRINTF
{
rrd_info_t *next;
- next = malloc(sizeof(*next));
+ next = (rrd_info_t*)(malloc(sizeof(*next)));
next->next = (rrd_info_t *) 0;
if (info)
info->next = next;
next->value.u_int = value.u_int;
break;
case RD_I_STR:
- next->value.u_str = malloc(sizeof(char) * (strlen(value.u_str) + 1));
+ next->value.u_str = (char*)(malloc(sizeof(char) * (strlen(value.u_str) + 1)));
strcpy(next->value.u_str, value.u_str);
break;
case RD_I_BLO:
next->value.u_blo.size = value.u_blo.size;
next->value.u_blo.ptr =
- malloc(sizeof(unsigned char) * value.u_blo.size);
+ (unsigned char*)malloc(sizeof(unsigned char) * value.u_blo.size);
memcpy(next->value.u_blo.ptr, value.u_blo.ptr, value.u_blo.size);
break;
}