Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
de06a2dd
Commit
de06a2dd
authored
Jul 12, 2010
by
Andreas Schwab
Browse files
* dbusbind.c (xd_initialize): Don't compare boolean with a constant.
parent
1408902e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
src/ChangeLog
src/ChangeLog
+5
-0
src/dbusbind.c
src/dbusbind.c
+7
-7
No files found.
src/ChangeLog
View file @
de06a2dd
2010-07-12 Andreas Schwab <schwab@linux-m68k.org>
* dbusbind.c (xd_initialize): Don't compare boolean with a
constant.
2010-07-12 Eli Zaretskii <eliz@gnu.org>
* process.c (setup_process_coding_systems): Move to the part
...
...
src/dbusbind.c
View file @
de06a2dd
...
...
@@ -714,9 +714,9 @@ xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
}
/* Initialize D-Bus connection. BUS is a Lisp symbol, either :system
or :session. It tells which D-Bus to
be
initialize
d
. RAISE_ERROR
can be TRUE or FALSE, it controls
whethe
r an error is signalled in
case the connection cannot be
initialized. */
or :session. It tells which D-Bus to initialize.
If
RAISE_ERROR
is non-zero signal an error
whe
n
the
connection cannot be
initialized. */
static
DBusConnection
*
xd_initialize
(
Lisp_Object
bus
,
int
raise_error
)
{
...
...
@@ -726,7 +726,7 @@ xd_initialize (Lisp_Object bus, int raise_error)
/* Parameter check. */
CHECK_SYMBOL
(
bus
);
if
(
!
(
EQ
(
bus
,
QCdbus_system_bus
)
||
EQ
(
bus
,
QCdbus_session_bus
)))
if
(
raise_error
==
TRUE
)
if
(
raise_error
)
XD_SIGNAL2
(
build_string
(
"Wrong bus name"
),
bus
);
else
return
NULL
;
...
...
@@ -734,7 +734,7 @@ xd_initialize (Lisp_Object bus, int raise_error)
/* We do not want to have an autolaunch for the session bus. */
if
(
EQ
(
bus
,
QCdbus_session_bus
)
&&
getenv
(
"DBUS_SESSION_BUS_ADDRESS"
)
==
NULL
)
if
(
raise_error
==
TRUE
)
if
(
raise_error
)
XD_SIGNAL2
(
build_string
(
"No connection to bus"
),
bus
);
else
return
NULL
;
...
...
@@ -748,12 +748,12 @@ xd_initialize (Lisp_Object bus, int raise_error)
connection
=
dbus_bus_get
(
DBUS_BUS_SESSION
,
&
derror
);
if
(
dbus_error_is_set
(
&
derror
))
if
(
raise_error
==
TRUE
)
if
(
raise_error
)
XD_ERROR
(
derror
);
else
connection
=
NULL
;
if
(
(
connection
==
NULL
)
&&
(
raise_error
==
TRUE
)
)
if
(
connection
==
NULL
&&
raise_error
)
XD_SIGNAL2
(
build_string
(
"No connection to bus"
),
bus
);
/* Cleanup. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment