Skip to content

Instantly share code, notes, and snippets.

@ovidiucs
Last active December 12, 2019 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ovidiucs/4c5e6898efab60c2797de867a1756d5b to your computer and use it in GitHub Desktop.
Save ovidiucs/4c5e6898efab60c2797de867a1756d5b to your computer and use it in GitHub Desktop.
Define tricks
#define FAIL_IF(EXP) (\
{\
if(EXP) {\
exit(EXIT_FAILURE);\
}\
}\
)\
#define FAIL_IF_MSG(EXP,MSG) (\
{\
if(EXP){\
printf(MSG"\n");\
exit(EXIT_FAILURE);\
}\
}\
)\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment