Style: Repeat for plugins
authorDenis Kenzior <denkenz@gmail.com>
Fri, 18 Dec 2009 03:33:48 +0000 (21:33 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 18 Dec 2009 03:45:39 +0000 (21:45 -0600)
plugins/atgen.c
plugins/calypso.c
plugins/modemconf.c
plugins/phonesim.c
plugins/udev.c

index 8300da2..e174d6f 100644 (file)
@@ -121,8 +121,9 @@ static int atgen_enable(struct ofono_modem *modem)
                        syntax = g_at_syntax_new_gsm_permissive();
                else
                        return -EINVAL;
-       } else
+       } else {
                syntax = g_at_syntax_new_gsmv1();
+       }
 
        chat = g_at_chat_new(channel, syntax);
        g_at_syntax_unref(syntax);
index c5403de..4d01881 100644 (file)
@@ -211,8 +211,9 @@ static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data)
                g_at_mux_shutdown(data->mux);
                g_at_mux_unref(data->mux);
                data->mux = NULL;
-       } else
+       } else {
                setup_modem(modem);
+       }
 
        ofono_modem_set_powered(modem, ok);
 }
index 39a62b8..882fa5a 100644 (file)
@@ -57,15 +57,17 @@ static int set_address(struct ofono_modem *modem,
        if (value) {
                ofono_modem_set_string(modem, "Address", value);
                g_free(value);
-       } else
+       } else {
                ofono_modem_set_string(modem, "Address", "127.0.0.1");
+       }
 
        value = g_key_file_get_string(keyfile, group, "Port", NULL);
        if (value) {
                ofono_modem_set_integer(modem, "Port", atoi(value));
                g_free(value);
-       } else
+       } else {
                ofono_modem_set_integer(modem, "Port", 12345);
+       }
 
        value = g_key_file_get_string(keyfile, group, "Modem", NULL);
        if (value) {
index 4704c4f..6b5a0da 100644 (file)
@@ -245,9 +245,10 @@ static int phonesim_enable(struct ofono_modem *modem)
                g_at_mux_setup_gsm0710(data->chat, mux_setup, modem, NULL);
                g_at_chat_unref(data->chat);
                data->chat = NULL;
-       } else
+       } else {
                g_at_chat_send(data->chat, "AT+CFUN=1", NULL,
                                        cfun_set_on_cb, modem, NULL);
+       }
 
        return -EINPROGRESS;
 }
index 8bb2d65..9ab865b 100644 (file)
@@ -115,8 +115,9 @@ static void add_mbm(struct ofono_modem *modem,
                devnode = udev_device_get_property_value(udev_device,
                                                                "INTERFACE");
                ofono_modem_set_string(modem, NETWORK_INTERFACE, devnode);
-       } else
+       } else {
                return;
+       }
 
        device  = ofono_modem_get_string(modem, MODEM_DEVICE);
        network = ofono_modem_get_string(modem, NETWORK_INTERFACE);
@@ -158,8 +159,9 @@ static void add_hso(struct ofono_modem *modem,
                devnode = udev_device_get_property_value(udev_device,
                                                                "INTERFACE");
                ofono_modem_set_string(modem, NETWORK_INTERFACE, devnode);
-       } else
+       } else {
                return;
+       }
 
        app = ofono_modem_get_string(modem, APPLICATION_PORT);
        control = ofono_modem_get_string(modem, CONTROL_PORT);