Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change error status code #12

Open
poul250 opened this issue Oct 24, 2020 · 1 comment
Open

Change error status code #12

poul250 opened this issue Oct 24, 2020 · 1 comment

Comments

@poul250
Copy link

poul250 commented Oct 24, 2020

Here is: https://github.com/Tynkute/Data.Triplets.Kernel/blob/17346c056451118a2b2df1a96458b6fc6c941795/Platform.Data.Triplets.Kernel/Common.h#L56-L59

#define SUCCESS_RESULT 1
#define succeeded(x) (SUCCESS_RESULT == (x))
#define ERROR_RESULT 0
#define failed(x) SUCCESS_RESULT != (x)

ERROR_RESULT equals to zero, but usually zero means no errors. We need to swap the numbers and make sure nothing breaks

@poul250
Copy link
Author

poul250 commented Oct 24, 2020

We also need to think about whether this is really a problem, in some cases it looks better.
like:

if (!open("<filename>")) {
// ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant