I mean, returning non-zero exit status on error is just good practice. It even managed to evaluate to the same numerical value as EXIT_FAILURE when I tested it on my machine (gcc 11.4.0 linux x86-64), although I’m not sure if that’s always the case or if it’s undefined behavior.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
I mean, returning non-zero exit status on error is just good practice. It even managed to evaluate to the same numerical value as
EXIT_FAILURE
when I tested it on my machine (gcc 11.4.0 linux x86-64), although I’m not sure if that’s always the case or if it’s undefined behavior.This cursed code is quite well-written.
!0 is defined as 1, that’s how argv [ no cap ] works, that and the ridiculous argc check stood out as a bit off, but works