A modelling and serializer library for Microsoft Azure IoTHub client applications

Dependents:   sht15_remote_monitoring f767zi_mqtt remote_monitoring simplesample_amqp ... more

This library implements a serializer library to be used in projects involving Microsoft Azure IoT Hub connectivity. The code is replicated from https://github.com/Azure/azure-iot-sdks

Revision:
30:5fabc80edeb1
Parent:
29:f6b8978f8581
Child:
35:ede97b73d1bb
--- a/agenttypesystem.c	Tue Jan 30 08:22:58 2018 -0800
+++ b/agenttypesystem.c	Thu Feb 15 11:37:06 2018 -0800
@@ -3974,40 +3974,34 @@
 // extern AGENT_DATA_TYPES_RESULT AgentDataType_GetComplexTypeField(AGENT_DATA_TYPE* agentData, size_t index, COMPLEX_TYPE_FIELD_TYPE* complexField);
 COMPLEX_TYPE_FIELD_TYPE* AgentDataType_GetComplexTypeField(AGENT_DATA_TYPE* agentData, size_t index)
 {
-    AGENT_DATA_TYPES_RESULT result;
     COMPLEX_TYPE_FIELD_TYPE* complexField = NULL;
     if (agentData == NULL)
     {
-        result = AGENT_DATA_TYPES_INVALID_ARG;
-        LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, result));
+        LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, AGENT_DATA_TYPES_INVALID_ARG));
     }
     else
     {
         if (agentData->type != EDM_COMPLEX_TYPE_TYPE)
         {
-            result = AGENT_DATA_TYPES_INVALID_ARG;
-            LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, result));
+            LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, AGENT_DATA_TYPES_INVALID_ARG));
         }
 
         else
         {
             if (index >= agentData->value.edmComplexType.nMembers)
             {
-                result = AGENT_DATA_TYPES_INVALID_ARG;
-                LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, result));
+                LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, AGENT_DATA_TYPES_INVALID_ARG));
             }
             else
             {
                 complexField = (COMPLEX_TYPE_FIELD_TYPE*)malloc(sizeof(COMPLEX_TYPE_FIELD_TYPE));
                 if (complexField == NULL)
                 {
-                    result = AGENT_DATA_TYPES_ERROR;
-                    LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, result));
+                    LogError("(result = %s)", ENUM_TO_STRING(AGENT_DATA_TYPES_RESULT, AGENT_DATA_TYPES_ERROR));
                 }
                 else
                 {
                     *complexField = agentData->value.edmComplexType.fields[index];
-                    result = AGENT_DATA_TYPES_OK;
                 }
             }
         }