don't check for < 0 on an unsigned variable (FDO Bug #12924)

2008-01-15  John (J5) Palmieri  <johnp@redhat.com>

	* patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>

	* dbus/dbus-connection.c (_dbus_connection_get_next_client_serial):
	don't check for < 0 on an unsigned variable (FDO Bug #12924)
This commit is contained in:
John (J5) Palmieri 2008-01-15 15:57:34 -05:00
parent 4cc2bfa10e
commit 738743002d
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2008-01-15 John (J5) Palmieri <johnp@redhat.com>
* patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
* dbus/dbus-connection.c (_dbus_connection_get_next_client_serial):
don't check for < 0 on an unsigned variable (FDO Bug #12924)
2008-01-15 John (J5) Palmieri <johnp@redhat.com>
* patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>

View file

@ -1378,13 +1378,13 @@ _dbus_connection_unref_unlocked (DBusConnection *connection)
static dbus_uint32_t
_dbus_connection_get_next_client_serial (DBusConnection *connection)
{
int serial;
dbus_uint32_t serial;
serial = connection->client_serial++;
if (connection->client_serial < 0)
if (connection->client_serial == 0)
connection->client_serial = 1;
return serial;
}