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

Comparing ray/src/util/glaresrc.c (file contents):
Revision 2.2 by greg, Tue Mar 10 10:00:33 1992 UTC vs.
Revision 2.3 by greg, Mon Jun 7 10:32:02 1993 UTC

# Line 382 | Line 382 | register struct source *sp;
382                          sp->dom += d;
383                  }
384          }
385 +        freespans(sp);
386 +        if (sp->dom <= FTINY) {         /* must be right at edge of image */
387 +                free((char *)sp);
388 +                return;
389 +        }
390          sp->brt /= (double)n;
391          compdir(sp->dir, (int)(hsum/sp->dom), (int)(vsum/sp->dom));
387        freespans(sp);
392          sp->next = donelist;
393          donelist = sp;
394          if (verbose)
# Line 463 | Line 467 | struct source  *sp;
467   {
468          register struct srcspan *ss;
469  
470 <        for (ss = sp->first; ss != NULL; ss = ss->next)
470 >        while ((ss = sp->first) != NULL) {
471 >                sp->first = ss->next;
472                  free((char *)ss);
473 <        sp->first = NULL;
473 >        }
474   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines