summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8b39784)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1027
a5681a0c-68f1-0310-ab6d-
d61299d08faa
+ char *ptr;
+ if ((buf == NULL) || (*buf == NULL))
+ return -1;
ptr=(*buf);
do {
(*buf)=ptr;
ptr=(*buf);
do {
(*buf)=ptr;
if((rrd->cdp_prep = rrd_realloc(rrd->cdp_prep,
rrd->stat_head->rra_cnt
*rrd->stat_head->ds_cnt*sizeof(cdp_prep_t)))==NULL){
if((rrd->cdp_prep = rrd_realloc(rrd->cdp_prep,
rrd->stat_head->rra_cnt
*rrd->stat_head->ds_cnt*sizeof(cdp_prep_t)))==NULL){
- rrd_set_error("allocating cdp_prep"); return -1; }
+ rrd_set_error("allocating cdp_prep"); return -1; }
memset(&(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rrd->stat_head->rra_cnt-1)]),
0, rrd->stat_head->ds_cnt*sizeof(cdp_prep_t));
memset(&(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rrd->stat_head->rra_cnt-1)]),
0, rrd->stat_head->ds_cnt*sizeof(cdp_prep_t));
read_tag(&ptr2, "xff","%lf",
&(rrd->rra_def[rra_index].par[RRA_cdp_xff_val].u_val));
} else {
read_tag(&ptr2, "xff","%lf",
&(rrd->rra_def[rra_index].par[RRA_cdp_xff_val].u_val));
} else {
- eat_tag(&ptr2, "params");
+ if (eat_tag(&ptr2, "params") != 1) {
+ rrd_set_error("could not find params tag to eat and skip");
+ return -1;
+ }
skip(&ptr2);
/* backwards compatibility w/ old patch */
if (strncmp(ptr2, "<value>",7) == 0) {
skip(&ptr2);
/* backwards compatibility w/ old patch */
if (strncmp(ptr2, "<value>",7) == 0) {