Advertisement
Guest User

some.c

a guest
May 3rd, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <stdlib.h>
  2.  
  3. int some_condition() { return 0; }
  4. int some_other_condition() { return 0; }
  5. void some_errors_occured() {}
  6.  
  7. void some_thing() {
  8.  
  9. do {
  10. if (some_condition()) {
  11. break;
  12. }
  13.  
  14. if (some_other_condition()) {
  15. break;
  16. }
  17.  
  18. errors_have_occured_noreturn();
  19. return;
  20.  
  21. } while (0);
  22.  
  23. some_final_action();
  24. }
  25.  
  26. void some_thing2() {
  27. if (some_condition() || some_other_condition()) {
  28. some_final_action();
  29. return;
  30. }
  31.  
  32. errors_have_occured_noreturn();
  33. return;
  34. }
  35.  
  36. int main(int argc, char **argv) {
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement