Fix errors on Arduino caused by proper initialization.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Wed, 4 Feb 2015 16:34:35 +0000 (11:34 -0500)
committerSashi Penta <sashi.kumar.penta@intel.com>
Fri, 6 Feb 2015 00:26:27 +0000 (00:26 +0000)
Initializing structs with "{0}" causes errors on Arduino where the
struct's first member is a non-primitive or something that can not be
properly set to "0" without a cast. I re-arranged the structs such that
the first member of the structs are of a primitive type or are typedef'd
as a primitive type.

Change-Id: Ib7ecced34ea85b1a8c9106c34e1d27890a4cf039
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/304
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
resource/csdk/connectivity/api/cacommon.h

index 796a72f..708f534 100644 (file)
@@ -294,11 +294,10 @@ typedef struct
  */
 typedef struct
 {
-
-    CAMessageType_t type;       /**< Qos for the request */
     uint16_t messageId;         /**< Message id.
                                  * if message id is zero, it will generated by CA inside.
                                  * otherwise, you can use it */
+    CAMessageType_t type;       /**< Qos for the request */
     CAToken_t token;            /**< Token for CA */
     CAHeaderOption_t *options;  /** Header Options for the request */
     uint8_t numOptions;         /**< Number of Header options */
@@ -323,8 +322,8 @@ typedef struct
  */
 typedef struct
 {
-    CAResponseResult_t result;  /**< Result for response by resource model */
     CAInfo_t info;              /**< Information of the response */
+    CAResponseResult_t result;  /**< Result for response by resource model */
 } CAResponseInfo_t;
 
 #ifdef __cplusplus