[PATCH] io: ftw: Use state stack instead of recursion (BZ 33882)

Andreas Schwab schwab@suse.de
Thu Feb 19 11:42:02 GMT 2026


On Feb 18 2026, Adhemerval Zanella wrote:

> +static struct ftw_frame *
> +stack_top(struct ftw_data *data)
> +{
> +  if (data->stack_size == 0)
> +    return NULL;

I think this should be an assertion, this and stack_pop should never be
called with an empty stack.  The uses of stack_top don't check for NULL
anyway.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


More information about the Libc-alpha mailing list