Guest User

Untitled

a guest
Oct 4th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1.     int code = 0;
  2.     if(load0(res0)){
  3.         code = -1;
  4.         goto e_res0;
  5.     }
  6.     some_code_here();
  7.     if(load1(res1)){
  8.         code = -2;
  9.         goto e_res1;
  10.     }
  11.     some_other_code_here();
  12.     if(load2(res2)){
  13.         code = -3;
  14.         goto e_res2;
  15.     }
  16.     yet_another_code_here();
  17.     if(load3(res3)){
  18.         code = -4;
  19.         goto e_res3;
  20.     }
  21.     and_yet_another_code_here();
  22.     unload3(res3);
  23. e_res3:
  24.     unload2(res2);
  25. e_res2:
  26.     unload1(res1);
  27. e_res1:
  28.     unload0(res0);
  29. e_res0:
  30.     return code;
Advertisement
Add Comment
Please, Sign In to add comment