removed #ifdef preprocessor wrapping #define
authorJaewook Jung <jw0213.jung@samsung.com>
Thu, 11 Aug 2016 08:28:50 +0000 (17:28 +0900)
committerJon A. Cruz <jon@joncruz.org>
Wed, 31 Aug 2016 20:11:10 +0000 (20:11 +0000)
Wrapping #define preprocessor with #ifdef doesn't have any influence.
It is unnecessary. Rather it could have a riskiness for redefinition.

Change-Id: I8262b288d75988de0b96d6879358d830d5de848a
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10261
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/stack/include/octypes.h

index 4f92f4b..2ae83e4 100644 (file)
@@ -64,15 +64,15 @@ extern "C" {
 
 /** Resource Type.*/
 #define OC_RSRVD_RESOURCE_TYPES_URI           "/oic/res/types/d"
-#if defined (ROUTING_GATEWAY) || defined (ROUTING_EP)
+
 /** Gateway URI.*/
 #define OC_RSRVD_GATEWAY_URI                  "/oic/gateway"
-#endif
 
 /** MQ Broker URI.*/
 #define OC_RSRVD_WELL_KNOWN_MQ_URI            "/oic/ps"
 
-#ifdef WITH_PRESENCE
+
+/** Presence */
 
 /** Presence URI through which the OIC devices advertise their presence.*/
 #define OC_RSRVD_PRESENCE_URI                 "/oic/ad"
@@ -81,13 +81,13 @@ extern "C" {
 #define OC_RSRVD_DEVICE_PRESENCE_URI         "/oic/prs"
 
 /** Sets the default time to live (TTL) for presence.*/
-#define OC_DEFAULT_PRESENCE_TTL_SECONDS (60)
+#define OC_DEFAULT_PRESENCE_TTL_SECONDS       (60)
 
 /** For multicast Discovery mechanism.*/
-#define OC_MULTICAST_DISCOVERY_URI           "/oic/res"
+#define OC_MULTICAST_DISCOVERY_URI            "/oic/res"
 
 /** Separator for multiple query string.*/
-#define OC_QUERY_SEPARATOR                "&;"
+#define OC_QUERY_SEPARATOR                    "&;"
 
 /**
  *  OC_DEFAULT_PRESENCE_TTL_SECONDS sets the default time to live (TTL) for presence.
@@ -101,7 +101,7 @@ extern "C" {
  *  60 sec/min * 60 min/hr * 24 hr/day
  */
 #define OC_MAX_PRESENCE_TTL_SECONDS     (60 * 60 * 24)
-#endif
+
 
 /**
  *  Presence "Announcement Triggers".
@@ -122,6 +122,7 @@ extern "C" {
 
 #define OC_RSRVD_OC                     "oic"
 
+
 /** For payload. */
 
 #define OC_RSRVD_PAYLOAD                "payload"
@@ -151,15 +152,14 @@ extern "C" {
 #define OC_RSRVD_RESOURCE_TYPE_PLATFORM "oic.wk.p"
 
 /** To represent resource type with RES.*/
-#define OC_RSRVD_RESOURCE_TYPE_RES    "oic.wk.res"
+#define OC_RSRVD_RESOURCE_TYPE_RES      "oic.wk.res"
 
-#ifdef WITH_MQ
 /** To represent content type with MQ Broker.*/
-#define OC_RSRVD_RESOURCE_TYPE_MQ_BROKER     "oic.wk.ps"
+#define OC_RSRVD_RESOURCE_TYPE_MQ_BROKER "oic.wk.ps"
 
 /** To represent content type with MQ Topic.*/
-#define OC_RSRVD_RESOURCE_TYPE_MQ_TOPIC      "oic.wk.ps.topic"
-#endif
+#define OC_RSRVD_RESOURCE_TYPE_MQ_TOPIC  "oic.wk.ps.topic"
+
 
 /** To represent interface.*/
 #define OC_RSRVD_INTERFACE              "if"
@@ -256,7 +256,7 @@ extern "C" {
 #define OC_RSRVD_SUPPORT_URL            "mnsl"
 
 /** System time for the platform. */
-#define OC_RSRVD_SYSTEM_TIME             "st"
+#define OC_RSRVD_SYSTEM_TIME            "st"
 
 /**
  *  Device.
@@ -275,10 +275,10 @@ extern "C" {
 #define OC_RSRVD_DATA_MODEL_VERSION     "dmv"
 
 /** Device specification version.*/
-#define OC_SPEC_VERSION                "core.1.0.0"
+#define OC_SPEC_VERSION                 "core.1.0.0"
 
 /** Device Data Model version.*/
-#define OC_DATA_MODEL_VERSION          "res.1.0.0"
+#define OC_DATA_MODEL_VERSION           "res.1.0.0"
 
 /**
  *  These provide backward compatibility - their use is deprecated.
@@ -286,13 +286,13 @@ extern "C" {
 #ifndef GOING_AWAY
 
 /** Multicast Prefix.*/
-#define OC_MULTICAST_PREFIX                  "224.0.1.187:5683"
+#define OC_MULTICAST_PREFIX             "224.0.1.187:5683"
 
 /** Multicast IP address.*/
-#define OC_MULTICAST_IP                      "224.0.1.187"
+#define OC_MULTICAST_IP                 "224.0.1.187"
 
 /** Multicast Port.*/
-#define OC_MULTICAST_PORT                    5683
+#define OC_MULTICAST_PORT               (5683)
 #endif // GOING_AWAY
 
 /** Max Device address size. */