Removed a really unpleasant test for whether a pointer points at a string
authordtrg <none@none>
Sun, 23 Jul 2006 19:38:13 +0000 (19:38 +0000)
committerdtrg <none@none>
Sun, 23 Jul 2006 19:38:13 +0000 (19:38 +0000)
constant or not by comparing it with 'end', which presumably points at
the top of the BSS. In fact, on Linux it evaluates to NULL, and on OSX it
doesn't exist at all, so it appears to be unnecessary.

util/ncgg/subr.c

index 60caad8..90bf44e 100644 (file)
@@ -281,15 +281,13 @@ setallreg(vi) struct varinfo *vi; {
 
 freevi(vip) register struct varinfo *vip; {
        register i;
-       extern char *end;
 
        if (vip==0)
                return;
        freevi(vip->vi_next);
        freevi(vip->vi_vi);
        for (i=0;i<VI_NSTR;i++)
-               if (vip->vi_str[i]>end)
-                       free((char *) vip->vi_str[i]);
+               free((char *) vip->vi_str[i]);
        free(vip);
 }