mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gdbusmessage: Drop redundant uint ≥ 0 checks
They are always true. Coverity CID: #1430645, #1430674, #1430884, #1430974 Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
c50fb4f317
commit
7afd4071d6
@ -877,7 +877,7 @@ g_dbus_message_set_message_type (GDBusMessage *message,
|
|||||||
GDBusMessageType type)
|
GDBusMessageType type)
|
||||||
{
|
{
|
||||||
g_return_if_fail (G_IS_DBUS_MESSAGE (message));
|
g_return_if_fail (G_IS_DBUS_MESSAGE (message));
|
||||||
g_return_if_fail ((guint) type >= 0 && (guint) type < 256);
|
g_return_if_fail ((guint) type < 256);
|
||||||
|
|
||||||
if (message->locked)
|
if (message->locked)
|
||||||
{
|
{
|
||||||
@ -924,7 +924,7 @@ g_dbus_message_set_flags (GDBusMessage *message,
|
|||||||
GDBusMessageFlags flags)
|
GDBusMessageFlags flags)
|
||||||
{
|
{
|
||||||
g_return_if_fail (G_IS_DBUS_MESSAGE (message));
|
g_return_if_fail (G_IS_DBUS_MESSAGE (message));
|
||||||
g_return_if_fail ((guint) flags >= 0 && (guint) flags < 256);
|
g_return_if_fail ((guint) flags < 256);
|
||||||
|
|
||||||
if (message->locked)
|
if (message->locked)
|
||||||
{
|
{
|
||||||
@ -1002,7 +1002,7 @@ g_dbus_message_get_header (GDBusMessage *message,
|
|||||||
GDBusMessageHeaderField header_field)
|
GDBusMessageHeaderField header_field)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (G_IS_DBUS_MESSAGE (message), NULL);
|
g_return_val_if_fail (G_IS_DBUS_MESSAGE (message), NULL);
|
||||||
g_return_val_if_fail ((guint) header_field >= 0 && (guint) header_field < 256, NULL);
|
g_return_val_if_fail ((guint) header_field < 256, NULL);
|
||||||
return g_hash_table_lookup (message->headers, GUINT_TO_POINTER (header_field));
|
return g_hash_table_lookup (message->headers, GUINT_TO_POINTER (header_field));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1024,7 +1024,7 @@ g_dbus_message_set_header (GDBusMessage *message,
|
|||||||
GVariant *value)
|
GVariant *value)
|
||||||
{
|
{
|
||||||
g_return_if_fail (G_IS_DBUS_MESSAGE (message));
|
g_return_if_fail (G_IS_DBUS_MESSAGE (message));
|
||||||
g_return_if_fail ((guint) header_field >= 0 && (guint) header_field < 256);
|
g_return_if_fail ((guint) header_field < 256);
|
||||||
|
|
||||||
if (message->locked)
|
if (message->locked)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user