summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/factory-reset.c20
1 files changed, 10 insertions, 10 deletions
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;