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

Comparing ray/src/rt/source.c (file contents):
Revision 1.47 by greg, Tue Oct 22 15:45:13 1991 UTC vs.
Revision 1.48 by greg, Mon Oct 28 08:08:19 1991 UTC

# Line 100 | Line 100 | marksources()                  /* find and mark source objects */
100          }
101          markvirtuals();                 /* find and add virtual sources */
102                                  /* allocate our contribution arrays */
103 <        maxcntr = nsources + MAXSPART*2;        /* start with this many */
103 >        maxcntr = nsources + MAXSPART;  /* start with this many */
104          srccnt = (CONTRIB *)malloc(maxcntr*sizeof(CONTRIB));
105          cntord = (CNTPTR *)malloc(maxcntr*sizeof(CNTPTR));
106 <        if (srccnt == NULL || cntord == NULL)
106 >        if (srccnt == NULL | cntord == NULL)
107                  goto memerr;
108          return;
109   memerr:
# Line 228 | Line 228 | char  *p;                      /* data for f */
228                                          maxcntr*sizeof(CONTRIB));
229                          cntord = (CNTPTR *)realloc((char *)cntord,
230                                          maxcntr*sizeof(CNTPTR));
231 <                        if (srccnt == NULL || cntord == NULL)
231 >                        if (srccnt == NULL | cntord == NULL)
232                                  error(SYSTEM, "out of memory in direct");
233                  }
234                  cntord[sn].sndx = sn;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines