AI 143543: Fix bug discovered by compiler.
This CL fixes a problem where a missing '*' caused a pointer to be compared
with 0 using the >= operator. The correct code is to compare the content
pointed by the pointer. The correct code can found in the recent 1.2 branch
of dbus, for example.
http://cgit.freedesktop.org/dbus/dbus/tree/dbus/dbus-sysdeps-unix.c?h=dbus-1.2-branch
The bug is mostly harmless since it only broke error handling. When there is
no error in openning a socket, the bug does not affect us.
This is tested by just building the tree since the bug is quite obvious.
Automated import of CL 143543
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
index 33204de..530cb41 100644
--- a/dbus/dbus-sysdeps-unix.c
+++ b/dbus/dbus-sysdeps-unix.c
@@ -84,7 +84,7 @@
DBusError *error)
{
*fd = socket (domain, type, protocol);
- if (fd >= 0)
+ if (*fd >= 0)
{
return TRUE;
}