I know EXIT_SUCCESS/EXIT_FAILURE is typically used for main() exit to indicate the successfulness of a program.
But is it also used (commonly or suggested) for normal function returns? I’m trying to write some “standard” code so wondering if I should use them instead of 0 or -1..
EXIT_SUCCESS is a simbolic constant.-
You can use
EXIT_SUCCESSandEXIT_FAILUREas well as 0 for OK and non 0 for failure.Depends on taste, you can also make this
and return those.-
Use whatever you feel more comfortable with, but keep your selection all the way.
Hope this helps!