Azure IoT common library
Dependents: STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more
Diff: map.c
- Revision:
- 45:1119d0f2c4d8
- Parent:
- 27:8656a313842b
diff -r 00caa8779676 -r 1119d0f2c4d8 map.c --- a/map.c Fri May 04 13:26:26 2018 -0700 +++ b/map.c Mon Jun 11 15:41:10 2018 -0700 @@ -44,7 +44,7 @@ /*Codes_SRS_MAP_02_004: [Map_Destroy shall release all resources associated with the map.] */ MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA*)handle; size_t i; - + for (i = 0; i < handleData->count; i++) { free(handleData->keys[i]); @@ -117,7 +117,7 @@ } else { - if (handleData->count == 0) + if (handleData->count == 0) { result->count = 0; result->keys = NULL; @@ -142,7 +142,7 @@ LogError("unable to clone values"); for (i = 0; i < result->count; i++) { - free(result->keys[i]); + free(result->keys[i]); } free(result->keys); free(result); @@ -221,7 +221,7 @@ { /*certainly > 1...*/ char** undoneValues; - char** undoneKeys = (char**)realloc(handleData->keys, sizeof(char*)* (handleData->count - 1)); + char** undoneKeys = (char**)realloc(handleData->keys, sizeof(char*)* (handleData->count - 1)); if (undoneKeys == NULL) { LogError("CATASTROPHIC error, unable to undo through realloc to a smaller size"); @@ -321,7 +321,7 @@ } } } - return result; + return result; } MAP_RESULT Map_Add(MAP_HANDLE handle, const char* key, const char* value) @@ -337,7 +337,7 @@ ) { result = MAP_INVALIDARG; - LOG_MAP_ERROR; + LOG_MAP_ERROR; } else { @@ -652,7 +652,7 @@ STRING_delete(key); } } - + if (breakFor) { LogError("error happened during JSON string builder"); @@ -674,4 +674,4 @@ } return result; -} \ No newline at end of file +}