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

common: and_null_if_valid + on_error improvements #86

Merged
merged 1 commit into from
Sep 10, 2016

Conversation

FSMaxB
Copy link
Contributor

@FSMaxB FSMaxB commented Sep 10, 2016

It is to hard to split these commits, so both in one:

  • replace all _and_null macros with _and_null_if_valid that check if a pointer is NULL before freeing anything
    • This has probably fixed a lot of bugs that could occur when an allocation failure happens and it has reduced the code size and visual complexity
  • replace if (status.status == SUCCESS) with on_error
  • use only ")" and not ");" for multiline macros

It is to hard to split these commits, so both in one:
* replace all _and_null macros with _and_null_if_valid that check if a pointer is NULL before freeing anything
  * This has probably fixed a lot of bugs that could occur when an allocation failure happens and it has reduced the code size significantly
* replace if (status.status == SUCCESS) with on_error
* use only ")" and not ");" for multiline macros
@FSMaxB FSMaxB merged commit 37d6998 into develop Sep 10, 2016
@FSMaxB FSMaxB deleted the free-and-null-if-valid branch September 11, 2016 13:43
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

Successfully merging this pull request may close these issues.

1 participant