--- ray/src/util/rttree_reduce.c 2015/08/12 00:10:51 2.12 +++ ray/src/util/rttree_reduce.c 2016/03/10 23:18:59 2.15 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rttree_reduce.c,v 2.12 2015/08/12 00:10:51 greg Exp $"; +static const char RCSid[] = "$Id: rttree_reduce.c,v 2.15 2016/03/10 23:18:59 schorsch Exp $"; #endif /* * A utility called by genBSDF.pl to reduce tensor tree samples and output @@ -44,7 +44,7 @@ double tthresh; /* acceptance threshold (TBD) */ static void new_kids(TNODE *pn) { - pn->kid = (TNODE *)calloc(1<kid = (TNODE *)calloc((size_t)1<kid == NULL) error(SYSTEM, "out of memory in new_kids"); } @@ -276,7 +276,7 @@ load_data(void) error(COMMAND, "unsupported input format"); break; } - datarr = (float *)calloc(1<<(log2g*ttrank), sizeof(float)); + datarr = (float *)calloc((size_t)1<<(log2g*ttrank), sizeof(float)); if (datarr == NULL) error(SYSTEM, "out of memory in load_data"); if (ttrank == 3) {