ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rttree_reduce.c
(Generate patch)

Comparing ray/src/util/rttree_reduce.c (file contents):
Revision 2.12 by greg, Wed Aug 12 00:10:51 2015 UTC vs.
Revision 2.15 by schorsch, Thu Mar 10 23:18:59 2016 UTC

# Line 44 | Line 44 | double tthresh;                /* acceptance threshold (TBD) */
44   static void
45   new_kids(TNODE *pn)
46   {
47 <        pn->kid = (TNODE *)calloc(1<<ttrank, sizeof(TNODE));
47 >        pn->kid = (TNODE *)calloc((size_t)1<<ttrank, sizeof(TNODE));
48          if (pn->kid == NULL)
49                  error(SYSTEM, "out of memory in new_kids");
50   }
# Line 276 | Line 276 | load_data(void)
276                  error(COMMAND, "unsupported input format");
277                  break;
278          }
279 <        datarr = (float *)calloc(1<<(log2g*ttrank), sizeof(float));
279 >        datarr = (float *)calloc((size_t)1<<(log2g*ttrank), sizeof(float));
280          if (datarr == NULL)
281                  error(SYSTEM, "out of memory in load_data");
282          if (ttrank == 3) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines