forked from libconfuse/libconfuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for issue libconfuse#37: Do not use assert() to check memory al…
…location. This patch removes assert()'s used for checking memory allocation: calloc(), malloc(), strdup(). Instead libConfuse now returns NULL to allow the caller to handle such errors more gracefully. Some memory allocations did even have an assert(), they simply assumed memory had been successfully allocated. These have also been fixed. For internal functions which previously asserted, their return value is now verified by the public API's using them. Some minor cleanup is also included in this commit: - Readability: avoid assignment inside conditionals - Whitespace for sectionalizing code Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
- Loading branch information
Showing
1 changed file
with
132 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters