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

Comparing ray/src/util/eplus_adduvf.c (file contents):
Revision 2.16 by greg, Mon Mar 3 17:51:50 2014 UTC vs.
Revision 2.19 by greg, Fri Dec 13 16:00:33 2019 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   */
9  
10   #include <stdlib.h>
11 + #include "platform.h"
12   #include "rtio.h"
13   #include "rtmath.h"
14   #include "random.h"
# Line 392 | Line 393 | start_rcontrib(SUBPROC *pd, ZONE *zp)
393                                                  /* now subsurfaces */
394          if (zp->ntotal > zp->nsurf) {
395                  if (zp->area_redu != NULL)
396 <                        memset(zp->area_redu, 0, sizeof(float)*zp->nsurf);
397 <                else if ((zp->area_redu = (float *)calloc(zp->nsurf,
396 >                        memset(zp->area_redu, 0, sizeof(float)*zp->ntotal);
397 >                else if ((zp->area_redu = (float *)calloc(zp->ntotal,
398                                                  sizeof(float))) == NULL)
399                          return(0);
400          }
# Line 716 | Line 717 | main(int argc, char *argv[])
717                  do {
718                          pnext = pptr->pnext;
719                          idf_delobject(our_idf, pptr);
720 <                } while (pnext != NULL);
720 >                } while ((pptr = pnext) != NULL);
721          }
722                                                  /* add to header */
723          if (our_idf->hrem == NULL ||

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines