diff options
author | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-07-17 10:37:39 +0800 |
---|---|---|
committer | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-07-17 10:37:39 +0800 |
commit | 1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (patch) | |
tree | 6e991827d28537f7f40f20786c2354fd04a9fdad /scripts/openvpn-script.c | |
parent | fbe905ab58ecc31fe64c410c5f580cadc30e7f04 (diff) | |
download | connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.tar.gz connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.tar.bz2 connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.zip |
Imported Upstream version 1.24upstream/1.24
Diffstat (limited to 'scripts/openvpn-script.c')
-rw-r--r-- | scripts/openvpn-script.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/openvpn-script.c b/scripts/openvpn-script.c index f37eab2f..e703c867 100644 --- a/scripts/openvpn-script.c +++ b/scripts/openvpn-script.c @@ -90,8 +90,8 @@ int main(int argc, char *argv[]) dbus_error_init(&error); conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error); - if (conn == NULL) { - if (dbus_error_is_set(&error) == TRUE) { + if (!conn) { + if (dbus_error_is_set(&error)) { print("%s", error.message); dbus_error_free(&error); } else @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) msg = dbus_message_new_method_call(busname, path, interface, "notify"); - if (msg == NULL) { + if (!msg) { dbus_connection_unref(conn); print("Failed to allocate method call"); goto out; @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) dbus_message_iter_close_container(&iter, &dict); - if (dbus_connection_send(conn, msg, NULL) == FALSE) { + if (!dbus_connection_send(conn, msg, NULL)) { print("Failed to send message"); goto out; } |