diff options
author | Sebastian Dröge <slomo@coaxion.net> | 2020-08-18 10:25:18 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2020-08-18 10:25:18 +0000 |
commit | 009791b614174c47d65393ebef711acd7daaccd0 (patch) | |
tree | b108b8990692c829c6ddd2836b4edc42ab865d42 /gio | |
parent | 5271b67e37d2b4f8005bbd24523cc7895d74ed6f (diff) | |
parent | 7afd4071d6e7fe6cde218cf7a1c2b0aab6904cdb (diff) | |
download | glib-009791b614174c47d65393ebef711acd7daaccd0.tar.gz |
Merge branch 'dbus-uint-checks' into 'master'
gdbusmessage: Drop redundant uint ≥ 0 checks
See merge request GNOME/glib!1625
Diffstat (limited to 'gio')
-rw-r--r-- | gio/gdbusmessage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c index 3b3a013af..0e4878dfb 100644 --- a/gio/gdbusmessage.c +++ b/gio/gdbusmessage.c @@ -877,7 +877,7 @@ g_dbus_message_set_message_type (GDBusMessage *message, GDBusMessageType type) { 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) { @@ -924,7 +924,7 @@ g_dbus_message_set_flags (GDBusMessage *message, GDBusMessageFlags flags) { 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) { @@ -1002,7 +1002,7 @@ g_dbus_message_get_header (GDBusMessage *message, GDBusMessageHeaderField header_field) { 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)); } @@ -1024,7 +1024,7 @@ g_dbus_message_set_header (GDBusMessage *message, GVariant *value) { 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) { |