From: Eric S. Raymond Date: Fri, 11 Nov 1994 20:50:03 +0000 (+0000) Subject: Safer traversal. X-Git-Tag: 1-2~36 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=6f32525a6a35c3fc7588e0e21240c32cce79ee08;p=cupl.git Safer traversal. --- diff --git a/interpret.c b/interpret.c index a7a7d5b..1f24213 100644 --- a/interpret.c +++ b/interpret.c @@ -93,6 +93,9 @@ static bool recursive_apply(node *tree, bool (*fun)(node *)) static bool r_mark_labels(node *tp) /* record label references */ { + if (ATOMIC(tp->type)) + return(TRUE); + /* count label definitions */ if (tp->type == LABEL) if (tp->cdr->type == BLOCK) @@ -249,6 +252,9 @@ static bool check_errors(node *tree) static bool r_label_rewrite(node *tp) /* resolve label references */ { + if (ATOMIC(tp->type)) + return(TRUE); + /* * KISS -- this code may do extra work, but it needs no special * knowledge about node types.