[efl-upgrade]
authorHyoyoung Chang <hyoyoung.chang@samsung.com>
Mon, 13 Sep 2010 04:27:53 +0000 (13:27 +0900)
committerHyoyoung Chang <hyoyoung.chang@samsung.com>
Mon, 13 Sep 2010 04:27:53 +0000 (13:27 +0900)
src/bin/e_dbus_bluez_test.c
src/bin/e_dbus_connman_test.c
src/bin/e_dbus_ofono_test.c
src/lib/bluez/e_bluez.c
src/lib/bluez/e_bluez_element.c
src/lib/connman/e_connman.c
src/lib/connman/e_connman_element.c
src/lib/dbus/e_dbus_object.c
src/lib/dbus/e_dbus_signal.c
src/lib/ofono/e_ofono.c
src/lib/ofono/e_ofono_element.c

index 5a7c45a..5acab58 100644 (file)
@@ -795,21 +795,21 @@ _on_input(__UNUSED__ void *data, Ecore_Fd_Handler *fd_handler)
        if (args)
          {
             printf("Commands with '%s' in the name:\n", args);
-            for (itr = maps; itr->cmd != NULL; itr++)
+            for (itr = maps; itr->cmd; itr++)
               if (strstr(itr->cmd, args))
                 printf("\t%s\n", itr->cmd);
          }
        else
          {
             fputs("Commands:\n", stdout);
-            for (itr = maps; itr->cmd != NULL; itr++)
+            for (itr = maps; itr->cmd; itr++)
               printf("\t%s\n", itr->cmd);
          }
        fputc('\n', stdout);
        return ECORE_CALLBACK_RENEW;
      }
 
-   for (itr = maps; itr->cmd != NULL; itr++)
+   for (itr = maps; itr->cmd; itr++)
      if (strcmp(itr->cmd, cmd) == 0)
        return itr->cb(cmd, args);
 
index d028ae5..150c8d2 100644 (file)
@@ -2424,21 +2424,21 @@ _on_input(__UNUSED__ void *data, Ecore_Fd_Handler *fd_handler)
        if (args)
          {
             printf("Commands with '%s' in the name:\n", args);
-            for (itr = maps; itr->cmd != NULL; itr++)
+            for (itr = maps; itr->cmd; itr++)
               if (strstr(itr->cmd, args))
                 printf("\t%s\n", itr->cmd);
          }
        else
          {
             fputs("Commands:\n", stdout);
-            for (itr = maps; itr->cmd != NULL; itr++)
+            for (itr = maps; itr->cmd; itr++)
               printf("\t%s\n", itr->cmd);
          }
        fputc('\n', stdout);
        return ECORE_CALLBACK_RENEW;
      }
 
-   for (itr = maps; itr->cmd != NULL; itr++)
+   for (itr = maps; itr->cmd; itr++)
      if (strcmp(itr->cmd, cmd) == 0)
        return itr->cb(cmd, args);
 
index 75d7faf..82cbbb9 100644 (file)
@@ -456,21 +456,21 @@ _on_input(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler)
        if (args)
          {
             printf("Commands with '%s' in the name:\n", args);
-            for (itr = maps; itr->cmd != NULL; itr++)
+            for (itr = maps; itr->cmd; itr++)
               if (strstr(itr->cmd, args))
                 printf("\t%s\n", itr->cmd);
          }
        else
          {
             fputs("Commands:\n", stdout);
-            for (itr = maps; itr->cmd != NULL; itr++)
+            for (itr = maps; itr->cmd; itr++)
               printf("\t%s\n", itr->cmd);
          }
        fputc('\n', stdout);
        return 1;
      }
 
-   for (itr = maps; itr->cmd != NULL; itr++)
+   for (itr = maps; itr->cmd; itr++)
      if (strcmp(itr->cmd, cmd) == 0)
        return itr->cb(cmd, args);
 
index c327ce2..12893aa 100644 (file)
@@ -235,43 +235,43 @@ e_bluez_system_init(E_DBus_Connection *edbus_conn)
    if (E_BLUEZ_EVENT_DEVICE_FOUND == 0)
      E_BLUEZ_EVENT_DEVICE_FOUND = ecore_event_type_new();
 
-   if (e_bluez_iface_manager == NULL)
+   if (!e_bluez_iface_manager)
      e_bluez_iface_manager = eina_stringshare_add("org.bluez.Manager");
-   if (e_bluez_iface_adapter == NULL)
+   if (!e_bluez_iface_adapter)
      e_bluez_iface_adapter = eina_stringshare_add("org.bluez.Adapter");
-   if (e_bluez_iface_device == NULL)
+   if (!e_bluez_iface_device)
      e_bluez_iface_device = eina_stringshare_add("org.bluez.Device");
-   if (e_bluez_prop_address == NULL)
+   if (!e_bluez_prop_address)
      e_bluez_prop_address = eina_stringshare_add("Address");
-   if (e_bluez_prop_name == NULL)
+   if (!e_bluez_prop_name)
      e_bluez_prop_name = eina_stringshare_add("Name");
-   if (e_bluez_prop_alias == NULL)
+   if (!e_bluez_prop_alias)
      e_bluez_prop_alias = eina_stringshare_add("Alias");
-   if (e_bluez_prop_class == NULL)
+   if (!e_bluez_prop_class)
      e_bluez_prop_class = eina_stringshare_add("Class");
-   if (e_bluez_prop_icon == NULL)
+   if (!e_bluez_prop_icon)
      e_bluez_prop_icon = eina_stringshare_add("Icon");
-   if (e_bluez_prop_paired == NULL)
+   if (!e_bluez_prop_paired)
      e_bluez_prop_paired = eina_stringshare_add("Paired");
-   if (e_bluez_prop_trusted == NULL)
+   if (!e_bluez_prop_trusted)
      e_bluez_prop_trusted = eina_stringshare_add("Trusted");
-   if (e_bluez_prop_connected == NULL)
+   if (!e_bluez_prop_connected)
      e_bluez_prop_connected = eina_stringshare_add("Connected");
-   if (e_bluez_prop_uuids == NULL)
+   if (!e_bluez_prop_uuids)
      e_bluez_prop_uuids = eina_stringshare_add("UUIDs");
-   if (e_bluez_prop_powered == NULL)
+   if (!e_bluez_prop_powered)
      e_bluez_prop_powered = eina_stringshare_add("Powered");
-   if (e_bluez_prop_discoverable == NULL)
+   if (!e_bluez_prop_discoverable)
      e_bluez_prop_discoverable = eina_stringshare_add("Discoverable");
-   if (e_bluez_prop_pairable == NULL)
+   if (!e_bluez_prop_pairable)
      e_bluez_prop_pairable = eina_stringshare_add("Pairable");
-   if (e_bluez_prop_discoverabletimeout == NULL)
+   if (!e_bluez_prop_discoverabletimeout)
      e_bluez_prop_discoverabletimeout = eina_stringshare_add("DiscoverableTimeout");
-   if (e_bluez_prop_pairabletimeout == NULL)
+   if (!e_bluez_prop_pairabletimeout)
      e_bluez_prop_pairabletimeout = eina_stringshare_add("PairableTimeout");
-   if (e_bluez_prop_discovering == NULL)
+   if (!e_bluez_prop_discovering)
      e_bluez_prop_discovering = eina_stringshare_add("Discovering");
-   if (e_bluez_prop_devices == NULL)
+   if (!e_bluez_prop_devices)
      e_bluez_prop_devices = eina_stringshare_add("Devices");
 
    e_bluez_conn = edbus_conn;
index d55c8ba..a89c2dc 100644 (file)
@@ -2214,7 +2214,7 @@ e_bluez_manager_clear_elements(void)
 void
 e_bluez_elements_init(void)
 {
-   EINA_SAFETY_ON_FALSE_RETURN(elements == NULL);
+   EINA_SAFETY_ON_FALSE_RETURN(!elements);
    elements =
      eina_hash_string_superfast_new(EINA_FREE_CB
                                    (_e_bluez_element_unregister_internal));
@@ -2223,7 +2223,7 @@ e_bluez_elements_init(void)
 void
 e_bluez_elements_shutdown(void)
 {
-   EINA_SAFETY_ON_FALSE_RETURN(elements != NULL);
+   EINA_SAFETY_ON_FALSE_RETURN(!!elements);
    eina_hash_free(elements);
    elements = NULL;
 }
index ff23190..bcd1038 100644 (file)
@@ -272,132 +272,132 @@ e_connman_system_init(E_DBus_Connection *edbus_conn)
    if (E_CONNMAN_EVENT_ELEMENT_UPDATED == 0)
      E_CONNMAN_EVENT_ELEMENT_UPDATED = ecore_event_type_new();
 
-   if (e_connman_iface_manager == NULL)
+   if (!e_connman_iface_manager)
      e_connman_iface_manager = eina_stringshare_add("org.moblin.connman.Manager");
-   if (e_connman_iface_network == NULL)
+   if (!e_connman_iface_network)
      e_connman_iface_network = eina_stringshare_add("org.moblin.connman.Network");
-   if (e_connman_iface_profile == NULL)
+   if (!e_connman_iface_profile)
      e_connman_iface_profile = eina_stringshare_add("org.moblin.connman.Profile");
-   if (e_connman_iface_service == NULL)
+   if (!e_connman_iface_service)
      e_connman_iface_service = eina_stringshare_add("org.moblin.connman.Service");
-   if (e_connman_iface_device == NULL)
+   if (!e_connman_iface_device)
      e_connman_iface_device = eina_stringshare_add("org.moblin.connman.Device");
-   if (e_connman_iface_connection == NULL)
+   if (!e_connman_iface_connection)
      e_connman_iface_connection = eina_stringshare_add("org.moblin.connman.Connection");
-   if (e_connman_iface_technology == NULL)
+   if (!e_connman_iface_technology)
      e_connman_iface_technology = eina_stringshare_add("org.moblin.connman.Technology");
 
-   if (e_connman_prop_available == NULL)
+   if (!e_connman_prop_available)
      e_connman_prop_available = eina_stringshare_add("Available");
-   if (e_connman_prop_connected == NULL)
+   if (!e_connman_prop_connected)
      e_connman_prop_connected = eina_stringshare_add("Connected");
-   if (e_connman_prop_connections == NULL)
+   if (!e_connman_prop_connections)
      e_connman_prop_connections = eina_stringshare_add("Connections");
-   if (e_connman_prop_default == NULL)
+   if (!e_connman_prop_default)
      e_connman_prop_default = eina_stringshare_add("Default");
-   if (e_connman_prop_device == NULL)
+   if (!e_connman_prop_device)
      e_connman_prop_device = eina_stringshare_add("Device");
-   if (e_connman_prop_devices == NULL)
+   if (!e_connman_prop_devices)
      e_connman_prop_devices = eina_stringshare_add("Devices");
-   if (e_connman_prop_interface == NULL)
+   if (!e_connman_prop_interface)
      e_connman_prop_interface = eina_stringshare_add("Interface");
-   if (e_connman_prop_ipv4 == NULL)
+   if (!e_connman_prop_ipv4)
      e_connman_prop_ipv4 = eina_stringshare_add("IPv4");
-   if (e_connman_prop_ipv4_configuration == NULL)
+   if (!e_connman_prop_ipv4_configuration)
      e_connman_prop_ipv4_configuration = eina_stringshare_add("IPv4.Configuration");
-   if (e_connman_prop_ethernet == NULL)
+   if (!e_connman_prop_ethernet)
      e_connman_prop_ethernet = eina_stringshare_add("Ethernet");
-   if (e_connman_prop_method == NULL)
+   if (!e_connman_prop_method)
      e_connman_prop_method = eina_stringshare_add("Method");
-   if (e_connman_prop_address == NULL)
+   if (!e_connman_prop_address)
      e_connman_prop_address = eina_stringshare_add("Address");
-   if (e_connman_prop_gateway == NULL)
+   if (!e_connman_prop_gateway)
      e_connman_prop_gateway = eina_stringshare_add("Gateway");
-   if (e_connman_prop_netmask == NULL)
+   if (!e_connman_prop_netmask)
      e_connman_prop_netmask = eina_stringshare_add("Netmask");
-   if (e_connman_prop_mtu == NULL)
+   if (!e_connman_prop_mtu)
      e_connman_prop_mtu = eina_stringshare_add("MTU");
-   if (e_connman_prop_name == NULL)
+   if (!e_connman_prop_name)
      e_connman_prop_name = eina_stringshare_add("Name");
-   if (e_connman_prop_network == NULL)
+   if (!e_connman_prop_network)
      e_connman_prop_network = eina_stringshare_add("Network");
-   if (e_connman_prop_networks == NULL)
+   if (!e_connman_prop_networks)
      e_connman_prop_networks = eina_stringshare_add("Networks");
-   if (e_connman_prop_offline_mode == NULL)
+   if (!e_connman_prop_offline_mode)
      e_connman_prop_offline_mode = eina_stringshare_add("OfflineMode");
-   if (e_connman_prop_policy == NULL)
+   if (!e_connman_prop_policy)
      e_connman_prop_policy = eina_stringshare_add("Policy");
-   if (e_connman_prop_powered == NULL)
+   if (!e_connman_prop_powered)
      e_connman_prop_powered = eina_stringshare_add("Powered");
-   if (e_connman_prop_priority == NULL)
+   if (!e_connman_prop_priority)
      e_connman_prop_priority = eina_stringshare_add("Priority");
-   if (e_connman_prop_profiles == NULL)
+   if (!e_connman_prop_profiles)
      e_connman_prop_profiles = eina_stringshare_add("Profiles");
-   if (e_connman_prop_profile_active == NULL)
+   if (!e_connman_prop_profile_active)
      e_connman_prop_profile_active = eina_stringshare_add("ActiveProfile");
-   if (e_connman_prop_services == NULL)
+   if (!e_connman_prop_services)
      e_connman_prop_services = eina_stringshare_add("Services");
-   if (e_connman_prop_technologies == NULL)
+   if (!e_connman_prop_technologies)
      e_connman_prop_technologies = eina_stringshare_add("Technologies");
-   if (e_connman_prop_remember == NULL)
+   if (!e_connman_prop_remember)
      e_connman_prop_remember = eina_stringshare_add("Remember");
-   if (e_connman_prop_scan_interval == NULL)
+   if (!e_connman_prop_scan_interval)
      e_connman_prop_scan_interval = eina_stringshare_add("ScanInterval");
-   if (e_connman_prop_scanning == NULL)
+   if (!e_connman_prop_scanning)
      e_connman_prop_scanning = eina_stringshare_add("Scanning");
-   if (e_connman_prop_state == NULL)
+   if (!e_connman_prop_state)
      e_connman_prop_state = eina_stringshare_add("State");
-   if (e_connman_prop_strength == NULL)
+   if (!e_connman_prop_strength)
      e_connman_prop_strength = eina_stringshare_add("Strength");
-   if (e_connman_prop_frequency == NULL)
+   if (!e_connman_prop_frequency)
      e_connman_prop_frequency = eina_stringshare_add("Frequency");
-   if (e_connman_prop_type == NULL)
+   if (!e_connman_prop_type)
      e_connman_prop_type = eina_stringshare_add("Type");
-   if (e_connman_prop_wifi_mode == NULL)
+   if (!e_connman_prop_wifi_mode)
      e_connman_prop_wifi_mode = eina_stringshare_add("WiFi.Mode");
-   if (e_connman_prop_wifi_passphrase == NULL)
+   if (!e_connman_prop_wifi_passphrase)
      e_connman_prop_wifi_passphrase = eina_stringshare_add("WiFi.Passphrase");
-   if (e_connman_prop_wifi_security == NULL)
+   if (!e_connman_prop_wifi_security)
      e_connman_prop_wifi_security = eina_stringshare_add("WiFi.Security");
-   if (e_connman_prop_wifi_ssid == NULL)
+   if (!e_connman_prop_wifi_ssid)
      e_connman_prop_wifi_ssid = eina_stringshare_add("WiFi.SSID");
-   if (e_connman_prop_wifi_channel == NULL)
+   if (!e_connman_prop_wifi_channel)
      e_connman_prop_wifi_channel = eina_stringshare_add("WiFi.Channel");
-   if (e_connman_prop_wifi_eap == NULL)
+   if (!e_connman_prop_wifi_eap)
      e_connman_prop_wifi_eap = eina_stringshare_add("WiFi.EAP");
-   if (e_connman_prop_error == NULL)
+   if (!e_connman_prop_error)
      e_connman_prop_error = eina_stringshare_add("Error");
-   if (e_connman_prop_mode == NULL)
+   if (!e_connman_prop_mode)
      e_connman_prop_mode = eina_stringshare_add("Mode");
-   if (e_connman_prop_security == NULL)
+   if (!e_connman_prop_security)
      e_connman_prop_security = eina_stringshare_add("Security");
-   if (e_connman_prop_passphrase == NULL)
+   if (!e_connman_prop_passphrase)
      e_connman_prop_passphrase = eina_stringshare_add("Passphrase");
-   if (e_connman_prop_passphrase_required == NULL)
+   if (!e_connman_prop_passphrase_required)
      e_connman_prop_passphrase_required = eina_stringshare_add("PassphraseRequired");
-   if (e_connman_prop_favorite == NULL)
+   if (!e_connman_prop_favorite)
      e_connman_prop_favorite = eina_stringshare_add("Favorite");
-   if (e_connman_prop_immutable == NULL)
+   if (!e_connman_prop_immutable)
      e_connman_prop_immutable = eina_stringshare_add("Immutable");
-   if (e_connman_prop_auto_connect == NULL)
+   if (!e_connman_prop_auto_connect)
      e_connman_prop_auto_connect = eina_stringshare_add("AutoConnect");
-   if (e_connman_prop_setup_required == NULL)
+   if (!e_connman_prop_setup_required)
      e_connman_prop_setup_required = eina_stringshare_add("SetupRequired");
-   if (e_connman_prop_apn == NULL)
+   if (!e_connman_prop_apn)
      e_connman_prop_apn = eina_stringshare_add("APN");
-   if (e_connman_prop_mcc == NULL)
+   if (!e_connman_prop_mcc)
      e_connman_prop_mcc = eina_stringshare_add("MCC");
-   if (e_connman_prop_mnc == NULL)
+   if (!e_connman_prop_mnc)
      e_connman_prop_mnc = eina_stringshare_add("MCN");
-   if (e_connman_prop_roaming == NULL)
+   if (!e_connman_prop_roaming)
      e_connman_prop_roaming = eina_stringshare_add("Roaming");
-   if (e_connman_prop_technology_default == NULL)
+   if (!e_connman_prop_technology_default)
      e_connman_prop_technology_default = eina_stringshare_add("DefaultTechnology");
-   if (e_connman_prop_technologies_available == NULL)
+   if (!e_connman_prop_technologies_available)
      e_connman_prop_technologies_available = eina_stringshare_add("AvailableTechnologies");
-   if (e_connman_prop_technologies_enabled == NULL)
+   if (!e_connman_prop_technologies_enabled)
      e_connman_prop_technologies_enabled = eina_stringshare_add("EnabledTechnologies");
-   if (e_connman_prop_technologies_connected == NULL)
+   if (!e_connman_prop_technologies_connected)
      e_connman_prop_technologies_connected = eina_stringshare_add("ConnectedTechnologies");
 
    e_connman_conn = edbus_conn;
index 6965349..5ceea25 100644 (file)
@@ -2207,7 +2207,7 @@ e_connman_manager_clear_elements(void)
 void
 e_connman_elements_init(void)
 {
-   EINA_SAFETY_ON_FALSE_RETURN(elements == NULL);
+   EINA_SAFETY_ON_FALSE_RETURN(!elements);
    elements =
      eina_hash_string_superfast_new(EINA_FREE_CB
                                    (_e_connman_element_unregister_internal));
@@ -2216,7 +2216,7 @@ e_connman_elements_init(void)
 void
 e_connman_elements_shutdown(void)
 {
-   EINA_SAFETY_ON_FALSE_RETURN(elements != NULL);
+   EINA_SAFETY_ON_FALSE_RETURN(!!elements);
    eina_hash_free(elements);
    elements = NULL;
 }
index 120f37a..c7f6a3f 100644 (file)
@@ -342,7 +342,7 @@ e_dbus_object_interface_detach(E_DBus_Object *obj, E_DBus_Interface *iface)
 
   DBG("e_dbus_object_interface_detach (%s, %s) ", obj->path, iface->name);
   found = eina_list_data_find(obj->interfaces, iface);
-  if (found == NULL) return;
+  if (!found) return;
 
   obj->interfaces = eina_list_remove(obj->interfaces, iface);
   obj->introspection_dirty = 1;
index 83a34fb..a2b844c 100644 (file)
@@ -80,7 +80,7 @@ cb_name_owner(void *data, DBusMessage *msg, DBusError *err)
 static int
 _match_append(char *buf, int size, int *used, const char *keyword, int keyword_size, const char *value, int value_size)
 {
-   if(value == NULL)
+   if(!value)
        return 1;
 
    if ((int) (*used + keyword_size + value_size + sizeof(",=''")) >= size)
index 7ccf98a..e67d1ff 100644 (file)
@@ -225,33 +225,33 @@ e_ofono_system_init(E_DBus_Connection *edbus_conn)
    if (E_OFONO_EVENT_ELEMENT_UPDATED == 0)
      E_OFONO_EVENT_ELEMENT_UPDATED = ecore_event_type_new();
 
-   if (e_ofono_iface_manager == NULL)
+   if (!e_ofono_iface_manager)
      e_ofono_iface_manager = eina_stringshare_add("org.ofono.Manager");
-   if (e_ofono_prop_modems == NULL)
+   if (!e_ofono_prop_modems)
      e_ofono_prop_modems = eina_stringshare_add("Modems");
-   if (e_ofono_iface_modem == NULL)
+   if (!e_ofono_iface_modem)
      e_ofono_iface_modem = eina_stringshare_add("org.ofono.Modem");
-   if (e_ofono_prop_name == NULL)
+   if (!e_ofono_prop_name)
      e_ofono_prop_name = eina_stringshare_add("Name");
-   if (e_ofono_prop_powered == NULL)
+   if (!e_ofono_prop_powered)
      e_ofono_prop_powered = eina_stringshare_add("Powered");
-   if (e_ofono_prop_interfaces == NULL)
+   if (!e_ofono_prop_interfaces)
      e_ofono_prop_interfaces = eina_stringshare_add("Interfaces");
-   if (e_ofono_iface_netreg == NULL)
+   if (!e_ofono_iface_netreg)
      e_ofono_iface_netreg = eina_stringshare_add("org.ofono.NetworkRegistration");
-   if (e_ofono_prop_mode == NULL)
+   if (!e_ofono_prop_mode)
      e_ofono_prop_mode = eina_stringshare_add("Mode");
-   if (e_ofono_prop_status == NULL)
+   if (!e_ofono_prop_status)
      e_ofono_prop_status = eina_stringshare_add("Status");
-   if (e_ofono_prop_operator == NULL)
+   if (!e_ofono_prop_operator)
      e_ofono_prop_operator = eina_stringshare_add("Operator");
-   if (e_ofono_prop_strength == NULL)
+   if (!e_ofono_prop_strength)
      e_ofono_prop_strength = eina_stringshare_add("Strength");
-   if (e_ofono_iface_sms == NULL)
+   if (!e_ofono_iface_sms)
    e_ofono_iface_sms = eina_stringshare_add("org.ofono.SmsManager");
-   if (e_ofono_prop_sca == NULL)
+   if (!e_ofono_prop_sca)
    e_ofono_prop_sca = eina_stringshare_add("ServiceCenterAddress");
-   if (e_ofono_method_send_sms == NULL)
+   if (!e_ofono_method_send_sms)
      e_ofono_method_send_sms = eina_stringshare_add("SendMessage");
 
    e_ofono_conn = edbus_conn;
index f70f0eb..d38886b 100644 (file)
@@ -2296,7 +2296,7 @@ e_ofono_manager_clear_elements(void)
 void
 e_ofono_elements_init(void)
 {
-   EINA_SAFETY_ON_FALSE_RETURN(elements == NULL);
+   EINA_SAFETY_ON_FALSE_RETURN(!elements);
    elements =
      eina_hash_string_superfast_new
      (EINA_FREE_CB(_e_ofono_element_unregister_internal));
@@ -2305,7 +2305,7 @@ e_ofono_elements_init(void)
 void
 e_ofono_elements_shutdown(void)
 {
-   EINA_SAFETY_ON_FALSE_RETURN(elements != NULL);
+   EINA_SAFETY_ON_FALSE_RETURN(!!elements);
    eina_hash_free(elements);
    elements = NULL;
 }