diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/misc.c | 8 | ||||
-rw-r--r-- | lib/proxy.c | 1 |
2 files changed, 5 insertions, 4 deletions
@@ -399,7 +399,7 @@ signed int do_iconv( char *from_cs, char *to_cs, char *src, char *dst, size_t si cd = g_iconv_open( to_cs, from_cs ); if( cd == (GIConv) -1 ) - return( -1 ); + return -1; inbytesleft = size ? size : strlen( src ); outbytesleft = maxbuf - 1; @@ -407,10 +407,10 @@ signed int do_iconv( char *from_cs, char *to_cs, char *src, char *dst, size_t si *outbuf = '\0'; g_iconv_close( cd ); - if( res == (size_t) -1 ) - return( -1 ); + if( res != 0 ) + return -1; else - return( outbuf - dst ); + return outbuf - dst; } /* A pretty reliable random number generator. Tries to use the /dev/random diff --git a/lib/proxy.c b/lib/proxy.c index b79afea4..3e5c9d49 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -84,6 +84,7 @@ static gboolean gaim_io_connected(gpointer data, gint source, b_input_condition b_event_remove(phb->inpa); closesocket(source); dup2(new_fd, source); + closesocket(new_fd); phb->inpa = b_input_add(source, B_EV_IO_WRITE, gaim_io_connected, phb); return FALSE; } |