Browse Source

lexical #9/19, aproach the `append'

cw has never been NULL here,
   because we used to survive an update of cw->wl_next here

wlist hasn't been NULL either,
  because there is no place where wlist becomes NULL without
  setting cw to NULL as well. yet cw isn't NULL (see above)
aproach the `append'
rlar 14 years ago
parent
commit
af0a0c2c03
  1. 11
      src/frontend/parser/lexical.c

11
src/frontend/parser/lexical.c

@ -75,9 +75,14 @@ static int numeofs = 0;
*/
#define newword cw->wl_word = copy(buf); \
cw->wl_next = wl_cons(NULL, NULL); \
cw->wl_next->wl_prev = cw; \
cw = cw->wl_next; \
{ wordlist *aux = wl_cons(NULL, NULL); \
if (cw) /* which is true here */ \
cw->wl_next = aux; \
aux->wl_prev = cw; \
cw = aux; \
if (!wlist) /* which is false here */ \
wlist = cw; \
} \
bzero(buf, NEW_BSIZE_SP); \
i = 0;

Loading…
Cancel
Save