Skip to content

Instantly share code, notes, and snippets.

@sproctor
Last active August 10, 2017 17:59
Show Gist options
  • Save sproctor/a566803251470462257fe48d5408ea2c to your computer and use it in GitHub Desktop.
Save sproctor/a566803251470462257fe48d5408ea2c to your computer and use it in GitHub Desktop.
wtf? a good example of bad
void function_name ()
{
for (d = first_descriptor; d; d = d->next)
{
if (condition1)
{
stuff1();
continue;
}
else if (condition2)
{
stuff2();
continue;
}
else
{
stuff3();
if (bad_condition)
break;
}
other_stuff();
}
more_other_stuff();
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment