From 7a2bb96c4b99c5e51fc294dedf192db316c28bc1 Mon Sep 17 00:00:00 2001 From: Youngjae Shin Date: Mon, 25 Sep 2017 13:37:50 +0900 Subject: fix build warning and coding rule error Change-Id: If2745e44e6cb8843b825eb1c25fa7ac9dfe489d6 --- src/factory-reset.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/factory-reset.c b/src/factory-reset.c index b3aaefb..6e06ab6 100644 --- a/src/factory-reset.c +++ b/src/factory-reset.c @@ -120,12 +120,12 @@ static GMainLoop* loop; static DBusConnection *bus_conn = NULL; static const char *dbus_obj_path = "/org/tizen/factoryreset"; -static void unregistered_func (DBusConnection *connection, void *user_data) +static void unregistered_func(DBusConnection *connection, void *user_data) { perror("factory-reset dbus unregistered\n"); } -static DBusHandlerResult message_func (DBusConnection *connection, +static DBusHandlerResult message_func(DBusConnection *connection, DBusMessage *message, void *user_data) { @@ -142,7 +142,7 @@ static DBusHandlerResult message_func (DBusConnection *connection, if (strncmp(dbus_message_get_interface(message), RESET_DBUS_INTERFACE, strlen(RESET_DBUS_INTERFACE)) != 0) { printf("Not correct interface: \"%s\"\n", - dbus_message_get_interface (message)); + dbus_message_get_interface(message)); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } @@ -187,10 +187,10 @@ static DBusHandlerResult message_func (DBusConnection *connection, } -static DBusHandlerResult filter_func (DBusConnection *connection, +static DBusHandlerResult filter_func(DBusConnection *connection, DBusMessage *message, void *user_data) { - if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, + if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { /* Exit cleanly. */ printf("Disconnected"); @@ -209,9 +209,9 @@ static int process_dbus(void) int ret; DBusError error; - loop = g_main_loop_new (NULL, FALSE); + loop = g_main_loop_new(NULL, FALSE); - dbus_error_init (&error); + dbus_error_init(&error); bus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error); if (!bus_conn) { perror("failed to get dbus system bus"); @@ -226,7 +226,7 @@ static int process_dbus(void) /* Should be ret == -1, if error is set */ if (ret == -1 && dbus_error_is_set(&error)) { - dbus_error_free (&error); + dbus_error_free(&error); return -1; } @@ -244,7 +244,7 @@ static int process_dbus(void) int main(int argc, char **argv) { FILE *fp; - int ret, i = 0, c; + int i = 0, c; const char *reset_cmd[] = {RUN_SCRIPT_FILE, NULL, NULL}; time_t t = time(NULL); struct tm tm2 = *localtime(&t); @@ -255,7 +255,7 @@ int main(int argc, char **argv) }; #if 0 - ret = setuid(0); + int ret = setuid(0); if (ret < 0) { perror("wrong permission"); return -1; -- cgit v1.2.3