diff --git a/src/frontend/define.c b/src/frontend/define.c index cf45570fe..28e0ccaec 100644 --- a/src/frontend/define.c +++ b/src/frontend/define.c @@ -407,21 +407,20 @@ trcopy(struct pnode *tree, char *args, struct pnode *nn) static struct pnode * ntharg(int num, struct pnode *args) { - // fact: num >= 1 for all known invocations of ntharg() - for (; args; args = args->pn_right, --num) { - if (num <= 1) { - if (args->pn_op && (args->pn_op->op_num == PT_OP_COMMA)) - return args->pn_left; - return args; - } - if (args->pn_op && (args->pn_op->op_num != PT_OP_COMMA)) { - if (num <= 2) - return args; - return NULL; - } + for (; args; args = args->pn_right, --num) { + if (num <= 1) { + if (args->pn_op && (args->pn_op->op_num == PT_OP_COMMA)) + return args->pn_left; + return args; } + if (args->pn_op && (args->pn_op->op_num != PT_OP_COMMA)) { + if (num <= 2) + return args; + return NULL; + } + } - return NULL; + return NULL; }