Apply Tizen Coding Rule 34/149234/5 accepted/tizen/4.0/unified/20170913.153247 submit/tizen_4.0/20170912.090155
authorpr.jung <pr.jung@samsung.com>
Tue, 12 Sep 2017 02:28:02 +0000 (11:28 +0900)
committerJung <pr.jung@samsung.com>
Tue, 12 Sep 2017 08:48:53 +0000 (08:48 +0000)
Change-Id: I8bad9418fc390b46879403fc6bd96dafd51e0991
Signed-off-by: pr.jung <pr.jung@samsung.com>
src/block/block.c
src/shared/dbus.c

index 7d85799..7b14acb 100644 (file)
@@ -3110,18 +3110,18 @@ out:
        return reply;
 }
 
-/* 
-  Method name      Method call format string  Reply format string 
-{ "ShowDeviceList",                     NULL,               NULL, request_show_device_list },
-{ "GetDeviceList" ,                      "s", "a(issssssisibii)", request_get_device_list },
-{ "GetDeviceList2",                      "s",  "a(issssssisibi)", request_get_device_list_2 },
-{ "Mount",                              "is",                "i", request_public_mount_block },
-{ "Unmount",                                    "ii",                "i", request_public_unmount_block },
-{ "Format",                             "ii",                "i", request_format_block },
-{ "GetDeviceInfo",                       "i",  "(issssssisibii)", request_get_device_info },
-{ "GetMmcPrimary" ,                     NULL, "(issssssisibii)" , request_get_mmc_primary },
-{ "PrivateMount",                       "is",                "i", request_private_mount_block },
-{ "PrivateUnmount",                     "ii",                "i", request_private_unmount_block },
+/*
+  Method name          Method call   format string         Reply format string
+{ "ShowDeviceList",    NULL,         NULL,                 request_show_device_list },
+{ "GetDeviceList" ,    "s",          "a(issssssisibii)",   request_get_device_list },
+{ "GetDeviceList2",    "s",          "a(issssssisibi)",    request_get_device_list_2 },
+{ "Mount",             "is",         "i",                  request_public_mount_block },
+{ "Unmoun,             "ii",         "i",                  request_public_unmount_block },
+{ "Format",            "ii",         "i",                  request_format_block },
+{ "GetDeviceInfo",     "i",          "(issssssisibii)",    request_get_device_info },
+{ "GetMmcPrimary",     NULL,         "(issssssisibii)",    request_get_mmc_primary },
+{ "PrivateMount",      "is",         "i",                  request_private_mount_block },
+{ "PrivateUnmount",    "ii",         "i",                  request_private_unmount_block },
 */
 
 static const dbus_method_s manager_methods[] = {
@@ -3273,7 +3273,7 @@ static void block_init(void *data)
                if (ret < 0)
                        _E("Failed to make directory: %d", errno);
        } else {
-               ret = chmod(EXTERNAL_STORAGE_PATH, 644);
+               ret = chmod(EXTERNAL_STORAGE_PATH, 0644);
                if (ret < 0)
                        _E("Fail to change permissions of a file");
        }
@@ -3291,7 +3291,7 @@ static void block_init(void *data)
                if (ret < 0)
                        _E("Failed to make directory: %d", errno);
        } else {
-               ret = chmod(EXTENDED_INTERNAL_PATH, 644);
+               ret = chmod(EXTENDED_INTERNAL_PATH, 0644);
                if (ret < 0)
                        _E("Fail to change permissions of a file");
        }
index 5c0fb9b..a9e0320 100644 (file)
@@ -226,9 +226,8 @@ static DBusHandlerResult method_call_handler(DBusConnection *connection,
 
        _D("Method call handler");
 
-       if (!msg || !mh) {
+       if (!msg || !mh)
                return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; // No message to handle
-       }
 
        iface = mh->iface;
        methods = iface->methods;
@@ -319,7 +318,7 @@ static dbus_bool_t add_watch_cb(DBusWatch *watch, void *data)
        struct watch_info *winfo;
        dbus_bool_t enabled;
 
-       _I("add_watch_cb %s", (dbus_watch_get_enabled(watch) == 0 ? "disabled": "enabled"));
+       _I("add_watch_cb %s", (dbus_watch_get_enabled(watch) == 0 ? "disabled" : "enabled"));
 
        enabled = dbus_watch_get_enabled(watch);
 
@@ -387,9 +386,8 @@ static gboolean dispatch_idler_cb(gpointer data)
 
        dbus_connection_ref(conn);
 
-       while (dbus_connection_get_dispatch_status(conn) == DBUS_DISPATCH_DATA_REMAINS) {
+       while (dbus_connection_get_dispatch_status(conn) == DBUS_DISPATCH_DATA_REMAINS)
                dbus_connection_dispatch(conn);
-       }
 
        dbus_connection_unref(conn);