Fixed OCLogger enum log levels to be legal
authorErich Keane <erich.keane@intel.com>
Tue, 3 Feb 2015 23:22:04 +0000 (15:22 -0800)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Thu, 5 Feb 2015 15:27:05 +0000 (15:27 +0000)
Double-underscores at the beginning of a token are reserved
for the compiler usage, so these values were removed.  I've also
altered the names a bit to make them look different enough so that
our users don't use them.

Finally, I made sure that they don't actually WORK, so that our
users won't be tempted to use them.

Change-Id: I3ae04ff32f01dfc6e0d89948a3b5b858157de6ab
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/298
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
resource/oc_logger/c/oc_logger.c
resource/oc_logger/include/oc_logger_types.h

index 4c3db1a..bc4b4a8 100644 (file)
@@ -44,7 +44,7 @@ oc_log_ctx_t *oc_log_make_ctx(
     0 == set_module)
   return 0;
 
- if(__OC_LOG_MIN__ > level || __OC_LOG_MAX__ < level)
+ if(OC_LOG_MIN_VAL__ >= level || OC_LOG_MAX_VAL__ <= level)
   return 0;
 
  log_ctx = (oc_log_ctx_t *)malloc(sizeof(oc_log_ctx_t));
index 4789711..bf8f3de 100644 (file)
@@ -28,7 +28,7 @@
 #endif
 
  typedef enum {
-     __OC_LOG_MIN__     = -1,
+     OC_LOG_MIN_VAL__   = -1,
      OC_LOG_ALL         = 0,
      OC_LOG_FATAL,
      OC_LOG_ERROR,
@@ -36,7 +36,7 @@
      OC_LOG_INFO,
      OC_LOG_DEBUG,
      OC_LOG_DISABLED,
-     __OC_LOG_MAX__
+     OC_LOG_MAX_VAL__
  } oc_log_level;
 
 typedef struct _oc_log_ctx