[libsoup/gnome-3-28] soup-address: Fix some issues found by Coverity Scan and clang
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/gnome-3-28] soup-address: Fix some issues found by Coverity Scan and clang
- Date: Mon, 25 Jun 2018 12:45:36 +0000 (UTC)
commit cb9f554442a3de331f248d84dbc3b720918b9503
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 25 14:46:42 2018 +0200
soup-address: Fix some issues found by Coverity Scan and clang
https://bugzilla.gnome.org/show_bug.cgi?id=781771
libsoup/soup-address.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libsoup/soup-address.c b/libsoup/soup-address.c
index 0351db50..53d3b61d 100644
--- a/libsoup/soup-address.c
+++ b/libsoup/soup-address.c
@@ -72,7 +72,7 @@ typedef struct {
sizeof (struct in6_addr))
/* sockaddr port macros */
-#define SOUP_ADDRESS_PORT_IS_VALID(port) (port >= 0 && port <= 65535)
+#define SOUP_ADDRESS_PORT_IS_VALID(port) (((gint) port) >= 0 && port <= 65535)
#define SOUP_ADDRESS_GET_PORT(priv) \
(priv->sockaddr->ss_family == AF_INET ? \
SOUP_SIN(priv)->sin_port : \
@@ -1183,10 +1183,10 @@ got_addresses (SoupAddress *addr, guint status, gpointer user_data)
if (error)
g_task_return_error (task, g_error_copy (error));
else {
- GSocketAddress *addr;
+ GSocketAddress *socket_addr;
- addr = next_address (g_task_get_source_object (task));
- g_task_return_pointer (task, addr, g_object_unref);
+ socket_addr = next_address (g_task_get_source_object (task));
+ g_task_return_pointer (task, socket_addr, g_object_unref);
}
g_object_unref (task);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]