iBeacon: Remove the ibeacon report signal handling
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-common.c
index cf00e0d..88b8ee4 100644 (file)
@@ -89,9 +89,8 @@ GDBusConnection *_bt_gdbus_init_session_gconn(void)
 {
        GError *error = NULL;
 
-       if (!g_thread_supported()) {
+       if (!g_thread_supported())
                g_thread_init(NULL);
-       }
 
        dbus_threads_init_default();
 
@@ -390,9 +389,8 @@ void _bt_convert_device_path_to_address(const char *device_path,
                dev_addr += 4;
                g_strlcpy(address, dev_addr, sizeof(address));
 
-               while ((pos = strchr(address, '_')) != NULL) {
+               while ((pos = strchr(address, '_')) != NULL)
                        *pos = ':';
-               }
 
                g_strlcpy(device_address, address, BT_ADDRESS_STRING_SIZE);
        }
@@ -402,21 +400,21 @@ void _bt_convert_device_path_to_address(const char *device_path,
 void _bt_convert_addr_string_to_type(unsigned char *addr,
                                        const char *address)
 {
-        int i;
-        char *ptr = NULL;
+       int i;
+       char *ptr = NULL;
 
        ret_if(address == NULL);
        ret_if(addr == NULL);
 
-        for (i = 0; i < BT_ADDRESS_LENGTH_MAX; i++) {
-                addr[i] = strtol(address, &ptr, 16);
-                if (ptr[0] != '\0') {
-                        if (ptr[0] != ':')
-                                return;
+       for (i = 0; i < BT_ADDRESS_LENGTH_MAX; i++) {
+               addr[i] = strtol(address, &ptr, 16);
+               if (ptr[0] != '\0') {
+                       if (ptr[0] != ':')
+                               return;
 
-                        address = ptr + 1;
-                }
-        }
+               address = ptr + 1;
+               }
+       }
 }
 
 void _bt_convert_addr_string_to_secure_string(char *addr,
@@ -577,9 +575,8 @@ int _bt_set_socket_non_blocking(int socket_fd)
        if (arg < 0)
                return -errno;
 
-       if (arg & O_NONBLOCK) {
+       if (arg & O_NONBLOCK)
                BT_ERR("Already Non-blocking \n");
-       }
 
        arg |= O_NONBLOCK;
 
@@ -623,9 +620,9 @@ static char *__bt_extract_device_path(GVariantIter *iter, char *address)
                        return NULL;
                }
                _bt_convert_device_path_to_address(object_path, device_address);
-               if (g_strcmp0(address, device_address) == 0) {
+               if (g_strcmp0(address, device_address) == 0)
                        return g_strdup(object_path);
-               }
+
        }
 
        BT_ERR("Unable to get object path");