Is there a reason there aren't any braces around single-line if statements? Is that a C thing? It seems kind of inviting to bugs to me.
It's a C-style language syntax option. If it's only a single line in after the if, the braces are optional. I've also seen it in C++ and PHP. Whether or not it's sloppy is up for debate and just a matter of personal preference.
Not _line_, _statement_. Consider
if(flag)
foo(); bar();
and if(flag)
foo =
bar +
baz;
That first example always calls bar().Warning: I haven't tested this, and am beginning to doubt a bit. It must be correct, but why, then, don't I remember seeing this in underhanded C contests? Combining that with macros allows you to hide the semicolon.