diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-10-05 16:47:52 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-10-05 16:47:52 +0000 |
commit | cea53848d3469fcae387c9f6ae689220d2385a56 (patch) | |
tree | 6fbb40599d58e178ebea7392b30585267bd5506e /libdimension | |
parent | 7a2f12ae3cd44d7318d26a5328af4925be03f117 (diff) | |
download | dimension-cea53848d3469fcae387c9f6ae689220d2385a56.tar.xz |
Actully guarantee array allocation in dmnsn_new_array().
Diffstat (limited to 'libdimension')
-rw-r--r-- | libdimension/dimension/array.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libdimension/dimension/array.h b/libdimension/dimension/array.h index 2154a9e..d962d42 100644 --- a/libdimension/dimension/array.h +++ b/libdimension/dimension/array.h @@ -19,9 +19,9 @@ *************************************************************************/ /* - * Simple thread-safe generalized arrays, for returning variable-length arrays - * from functions, and other fun stuff. All functions are inline for - * performance reasons. + * Simple generalized arrays, for returning variable-length arrays from + * functions, and other fun stuff. All functions are inline for performance + * reasons. */ #ifndef DIMENSION_ARRAY_H @@ -52,6 +52,8 @@ dmnsn_new_array(size_t obj_size) if (!array->ptr) { dmnsn_error(DMNSN_SEVERITY_HIGH, "Array allocation failed."); } + } else { + dmnsn_error(DMNSN_SEVERITY_HIGH, "Array allocation failed."); } return array; |