Created
February 20, 2017 09:12
-
-
Save Leandros/b31c863062b9e202abf6ae9e2835c2d2 to your computer and use it in GitHub Desktop.
Error Checking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int | |
foo_can_fail(void) | |
{ | |
bar_t bar; | |
if (bar_init(&bar)) | |
return 1; | |
if (bar_do_stuff(&bar)) | |
goto err1; | |
return 0; | |
err1: | |
bar_free(&bar); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment