Azure IoT common library
Fork of azure_c_shared_utility by
Diff: vector.c
- Revision:
- 21:b92006c5b9ff
- Parent:
- 19:2e0811512ceb
diff -r 95abdea56064 -r b92006c5b9ff vector.c --- a/vector.c Fri Feb 10 17:01:36 2017 -0800 +++ b/vector.c Fri Feb 24 14:01:41 2017 -0800 @@ -4,6 +4,7 @@ #include <stdlib.h> #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/vector.h" +#include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/vector_types_internal.h" @@ -94,7 +95,7 @@ /* Codes_SRS_VECTOR_10_034: [VECTOR_push_back shall fail and return non-zero if `elements` is NULL.] */ /* Codes_SRS_VECTOR_10_035: [VECTOR_push_back shall fail and return non-zero if `numElements` is 0.] */ LogError("invalid argument - handle(%p), elements(%p), numElements(%zd).", handle, elements, numElements); - result = __LINE__; + result = __FAILURE__; } else { @@ -106,7 +107,7 @@ { /* Codes_SRS_VECTOR_10_012: [VECTOR_push_back shall fail and return non-zero if memory allocation fails.] */ LogError("realloc failed."); - result = __LINE__; + result = __FAILURE__; } else {