Check validity of database
[platform/core/connectivity/stc-manager.git] / include / stc-manager-util.h
index 7440534..3dd9b38 100755 (executable)
@@ -85,7 +85,7 @@
 #define EXEC(error_code, command) do { \
        if (error_code != command) { \
                __STC_LOG_FUNC_EXIT__; \
-               goto handle_error; \
+               return false; \
        } \
 } while (0)
 
@@ -253,7 +253,8 @@ static inline bool strstart_with(const char *str, const char *with)
 
 #define ret_msg_if(expr, fmt, arg...) do {     \
        if (expr) {                             \
-               STC_LOGE(fmt, ##arg);           \
+               if (STC_DEBUG_LOG)              \
+                       STC_LOGD(fmt, ##arg);           \
                return;                         \
        }                                       \
 } while (0)
@@ -267,20 +268,11 @@ static inline bool strstart_with(const char *str, const char *with)
 #define ret_value_msg_if(expr, val, fmt, arg...) do {  \
        if (expr) {                                     \
                if (STC_DEBUG_LOG)                              \
-                       STC_LOGE(fmt, ##arg);                   \
+                       STC_LOGD(fmt, ##arg);                   \
                return val;                             \
        }                                               \
 } while (0)
 
-#define ret_value_errno_msg_if(expr, val, fmt, arg...) do { \
-       if (expr) {                                         \
-               if (STC_DEBUG_LOG)                          \
-                       STC_LOGE(fmt, ##arg);                       \
-               return val;                                 \
-       }                                                   \
-} while (0)
-
-
 /*
  * @brief Copy from source to destination
  * destination should not be on heap.