3 ms·
You don't need C99 for this, just some extra braces: if (fd == -1) return; if (p == -1 || (u_int)p >= npfd) fatal_f("channel %d: b
by nybble41 5y ago
You don't need C99 for this, just some extra braces:
if (fd == -1)
return;
if (p == -1 || (u_int)p >= npfd)
fatal_f("channel %d: bad pfd %d (max %u)", c->self, p, npfd);
{
struct pollfd *pfd = &pfds[p];
dump_channel_poll(__func__, what, c, p, pfd);
}
It's perfectly valid C89 to declare a variable at the start of a nested compound statement no matter where it appears in the outer block, so in practice you can declare variables wherever you want so long as you don't mind the extra clutter.