]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/c_sdk/standard/mqtt/src/iot_mqtt_subscription.c
Cosmetic changes in the MQTT demo
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-IoT-Libraries / c_sdk / standard / mqtt / src / iot_mqtt_subscription.c
index 99664de057840ffaae2335db193744b810c5cf8d..59caccc7fb33103fef9701b2ef77e55a0e4238a4 100644 (file)
@@ -406,12 +406,11 @@ void _IotMqtt_InvokeSubscriptionCallback( _mqttConnection_t * pMqttConnection,
 \r
     void ( * callbackFunction )( void *,\r
                                  IotMqttCallbackParam_t * ) = NULL;\r
-    _topicMatchParams_t topicMatchParams =\r
-    {\r
-        .pTopicName      = pCallbackParam->u.message.info.pTopicName,\r
-        .topicNameLength = pCallbackParam->u.message.info.topicNameLength,\r
-        .exactMatchOnly  = false\r
-    };\r
+    _topicMatchParams_t topicMatchParams = { 0 };\r
+\r
+    topicMatchParams.pTopicName = pCallbackParam->u.message.info.pTopicName;\r
+    topicMatchParams.topicNameLength = pCallbackParam->u.message.info.topicNameLength;\r
+    topicMatchParams.exactMatchOnly = false;\r
 \r
     /* Prevent any other thread from modifying the subscription list while this\r
      * function is searching. */\r
@@ -508,11 +507,10 @@ void _IotMqtt_RemoveSubscriptionByPacket( _mqttConnection_t * pMqttConnection,
                                           uint16_t packetIdentifier,\r
                                           int32_t order )\r
 {\r
-    const _packetMatchParams_t packetMatchParams =\r
-    {\r
-        .packetIdentifier = packetIdentifier,\r
-        .order            = order\r
-    };\r
+    _packetMatchParams_t packetMatchParams = { 0 };\r
+\r
+    packetMatchParams.packetIdentifier = packetIdentifier;\r
+    packetMatchParams.order = order;\r
 \r
     IotMutex_Lock( &( pMqttConnection->subscriptionMutex ) );\r
     IotListDouble_RemoveAllMatches( &( pMqttConnection->subscriptionList ),\r
@@ -593,12 +591,11 @@ bool IotMqtt_IsSubscribed( IotMqttConnection_t mqttConnection,
     bool status = false;\r
     _mqttSubscription_t * pSubscription = NULL;\r
     IotLink_t * pSubscriptionLink = NULL;\r
-    _topicMatchParams_t topicMatchParams =\r
-    {\r
-        .pTopicName      = pTopicFilter,\r
-        .topicNameLength = topicFilterLength,\r
-        .exactMatchOnly  = true\r
-    };\r
+    _topicMatchParams_t topicMatchParams = { 0 };\r
+\r
+    topicMatchParams.pTopicName = pTopicFilter;\r
+    topicMatchParams.topicNameLength = topicFilterLength;\r
+    topicMatchParams.exactMatchOnly = false;\r
 \r
     /* Prevent any other thread from modifying the subscription list while this\r
      * function is running. */\r