Skip to content

Instantly share code, notes, and snippets.

@cosinekitty
Created May 19, 2020 01:06
Show Gist options
  • Save cosinekitty/fe95ec8ea7859241103024735355192b to your computer and use it in GitHub Desktop.
Save cosinekitty/fe95ec8ea7859241103024735355192b to your computer and use it in GitHub Desktop.
int main()
{
/*... blah blah blah ...*/
if (error1)
goto handle_error; /* YUCK! */
if (error2)
{
handle_error:
free(line);
fclose(infile);
return 1;
}
/*... more stuff... */
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment