[gupnp/gupnp-1.0] linux-cm: Fix compiler warning about negative shift



commit ccc7ab11e4589a0a0147e8421654bde2df0381a5
Author: Jens Georg <mail jensge org>
Date:   Sat Oct 15 13:25:19 2016 +0200

    linux-cm: Fix compiler warning about negative shift
    
    Signed-off-by: Jens Georg <mail jensge org>

 libgupnp/gupnp-linux-context-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c
index cdf2ae3..441a2db 100644
--- a/libgupnp/gupnp-linux-context-manager.c
+++ b/libgupnp/gupnp-linux-context-manager.c
@@ -433,7 +433,7 @@ extract_info (struct nlmsghdr *header,
                                 struct in_addr addr, *data;
                                 guint32 bitmask;
 
-                                bitmask = htonl((~0) << (32 - prefixlen));
+                                bitmask = htonl(G_MAXUINT32 << (32 - prefixlen));
                                 data = RTA_DATA (rt_attr);
 
                                 addr.s_addr = data->s_addr & bitmask;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]