fix boundary error in portmon code
authorPhilip Kovacs <pkovacs@users.sourceforge.net>
Sun, 10 Dec 2006 05:57:37 +0000 (05:57 +0000)
committerPhilip Kovacs <pkovacs@users.sourceforge.net>
Sun, 10 Dec 2006 05:57:37 +0000 (05:57 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@810 7f574dfc-610e-0410-a909-a81674777703

src/libtcp-portmon.c

index 1dcbe6e..11b9ea9 100644 (file)
@@ -365,7 +365,7 @@ int peek_tcp_port_monitor(
 
    /* if the connection index is out of range, we simply return with no error
     * having first cleared the client-supplied buffer. */
-   if ( (item!=COUNT) && ((unsigned)connection_index > g_hash_table_size (p_monitor->hash) - 1) )
+   if ( (item!=COUNT) && (connection_index > (int)g_hash_table_size (p_monitor->hash) - 1) )
           return(0);
                   
    switch (item) {