aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorAndreas Schwab2010-07-12 21:03:53 +0200
committerAndreas Schwab2010-07-12 21:03:53 +0200
commitde06a2dd4d6bd4b352a22b71b58dd7ae15c81fe0 (patch)
tree15b91872efd8f77a1fbce288f63ef3e58b2ffd26 /src/dbusbind.c
parent1408902e039f0a912b718898c6d19f7ba8841ba5 (diff)
downloademacs-de06a2dd4d6bd4b352a22b71b58dd7ae15c81fe0.tar.gz
emacs-de06a2dd4d6bd4b352a22b71b58dd7ae15c81fe0.zip
* dbusbind.c (xd_initialize): Don't compare boolean with a constant.
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index c5dbb62aed9..683d6f047fa 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -714,9 +714,9 @@ xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
714} 714}
715 715
716/* Initialize D-Bus connection. BUS is a Lisp symbol, either :system 716/* Initialize D-Bus connection. BUS is a Lisp symbol, either :system
717 or :session. It tells which D-Bus to be initialized. RAISE_ERROR 717 or :session. It tells which D-Bus to initialize. If RAISE_ERROR
718 can be TRUE or FALSE, it controls whether an error is signalled in 718 is non-zero signal an error when the connection cannot be
719 case the connection cannot be initialized. */ 719 initialized. */
720static DBusConnection * 720static DBusConnection *
721xd_initialize (Lisp_Object bus, int raise_error) 721xd_initialize (Lisp_Object bus, int raise_error)
722{ 722{
@@ -726,7 +726,7 @@ xd_initialize (Lisp_Object bus, int raise_error)
726 /* Parameter check. */ 726 /* Parameter check. */
727 CHECK_SYMBOL (bus); 727 CHECK_SYMBOL (bus);
728 if (!(EQ (bus, QCdbus_system_bus) || EQ (bus, QCdbus_session_bus))) 728 if (!(EQ (bus, QCdbus_system_bus) || EQ (bus, QCdbus_session_bus)))
729 if (raise_error == TRUE) 729 if (raise_error)
730 XD_SIGNAL2 (build_string ("Wrong bus name"), bus); 730 XD_SIGNAL2 (build_string ("Wrong bus name"), bus);
731 else 731 else
732 return NULL; 732 return NULL;
@@ -734,7 +734,7 @@ xd_initialize (Lisp_Object bus, int raise_error)
734 /* We do not want to have an autolaunch for the session bus. */ 734 /* We do not want to have an autolaunch for the session bus. */
735 if (EQ (bus, QCdbus_session_bus) 735 if (EQ (bus, QCdbus_session_bus)
736 && getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL) 736 && getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL)
737 if (raise_error == TRUE) 737 if (raise_error)
738 XD_SIGNAL2 (build_string ("No connection to bus"), bus); 738 XD_SIGNAL2 (build_string ("No connection to bus"), bus);
739 else 739 else
740 return NULL; 740 return NULL;
@@ -748,12 +748,12 @@ xd_initialize (Lisp_Object bus, int raise_error)
748 connection = dbus_bus_get (DBUS_BUS_SESSION, &derror); 748 connection = dbus_bus_get (DBUS_BUS_SESSION, &derror);
749 749
750 if (dbus_error_is_set (&derror)) 750 if (dbus_error_is_set (&derror))
751 if (raise_error == TRUE) 751 if (raise_error)
752 XD_ERROR (derror); 752 XD_ERROR (derror);
753 else 753 else
754 connection = NULL; 754 connection = NULL;
755 755
756 if ((connection == NULL) && (raise_error == TRUE)) 756 if (connection == NULL && raise_error)
757 XD_SIGNAL2 (build_string ("No connection to bus"), bus); 757 XD_SIGNAL2 (build_string ("No connection to bus"), bus);
758 758
759 /* Cleanup. */ 759 /* Cleanup. */