This avoids a cpu loop for "while do done" and is consistent with
the behavior of AT&T ksh and most other shells. OK jca@ halex@
-/* $OpenBSD: syn.c,v 1.39 2018/04/24 08:25:16 kn Exp $ */
+/* $OpenBSD: syn.c,v 1.40 2021/07/05 13:41:46 millert Exp $ */
/*
* shell parser (C version)
nesting_push(&old_nesting, c);
t = newtp((c == WHILE) ? TWHILE : TUNTIL);
t->left = c_list(true);
+ if (t->left == NULL)
+ syntaxerr(NULL);
t->right = dogroup();
nesting_pop(&old_nesting);
break;