Page 1 of 1

[Nagios-devel] xodtemplate.c malloc question

Posted: Mon Dec 15, 2008 2:50 pm
by Guest
just something I thought was odd, is the following diff valid?
thanks.


--- xdata/xodtemplate.c 2008-11-30 19:22:59.000000000 +0200
+++ /tmp/xodtemplate.c 2008-12-15 16:45:58.000000000 +0200
@@ -175,7 +175,7 @@

/* allocate memory for 256 config files (increased dynamically) */
xodtemplate_current_config_file=0;
- xodtemplate_config_files=(char **)malloc(256*sizeof(char **));
+ xodtemplate_config_files=(char *)malloc(256*sizeof(char *));
if(xodtemplate_config_files==NULL)
return ERROR;








This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]