Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fopen(...);
- if(/* Error */){
- return 1;
- }
- malloc(...);
- if(/* Error */){
- fclose(...);
- return 2;
- }
- parseInt(...);
- if(/* Error */){
- free(...);
- fclose(...);
- return 3;
- }
- //Stuff
- free(...);
- fclose(...);
- return 0;
- /* VS */
- int error = 0;
- fopen(...);
- if(/* Error */){
- error = 1;
- goto q;
- }
- malloc(...);
- if(/* Error */){
- error = 2;
- goto fc;
- }
- parseInt(...);
- if(/* Error */){
- error = 3;
- goto fr;
- }
- //Stuff
- fr: free(...);
- fc: fclose(...);
- q: return error;
Add Comment
Please, Sign In to add comment