use GUINT_TO_POINTER

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3743 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-06-10 20:47:12 +00:00
parent 0fdb07ca3d
commit 69adda9b65

View File

@@ -667,7 +667,7 @@ reserve_shared_ip (void)
guint32 start = (guint32) ntohl (0x0a2a2b01); /* 10.42.43.1 */ guint32 start = (guint32) ntohl (0x0a2a2b01); /* 10.42.43.1 */
guint32 count = 0; guint32 count = 0;
while (g_hash_table_lookup (shared_ips, (gpointer) (start + count))) { while (g_hash_table_lookup (shared_ips, GUINT_TO_POINTER (start + count))) {
count += ntohl (0x100); count += ntohl (0x100);
if (count > ntohl (0xFE00)) { if (count > ntohl (0xFE00)) {
nm_warning ("%s: ran out of shared IP addresses!", __func__); nm_warning ("%s: ran out of shared IP addresses!", __func__);
@@ -675,7 +675,7 @@ reserve_shared_ip (void)
} }
} }
g_hash_table_insert (shared_ips, (gpointer) (start + count), GUINT_TO_POINTER (TRUE)); g_hash_table_insert (shared_ips, GUINT_TO_POINTER (start + count), GUINT_TO_POINTER (TRUE));
return start + count; return start + count;
} }