4 ms·
This is a nice structure, It also suggests something like closures where you inverse stacked the functions and did something like: int do_command(sdio_comma
by ChuckMcM 13y ago
This is a nice structure, It also suggests something like closures where you inverse stacked the functions and did something like:
int do_command(sdio_command_chain *cmd) {
int err = 0;
if (cmd->next) {
err = do_command(cmd->next);
}
return (err) ? err : call_command(cmd->parms);
}
Thanks for that!