mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
Fixed some signedness warnings and memdebug.h should compile now fine
with -ansi. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1124 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ae2bb54a42
commit
0d62878d6e
7 changed files with 27 additions and 15 deletions
|
|
@ -277,7 +277,8 @@ GIOChannel *net_accept(GIOChannel *handle, IPADDR *addr, int *port)
|
|||
/* Read data from socket, return number of bytes read, -1 = error */
|
||||
int net_receive(GIOChannel *handle, char *buf, int len)
|
||||
{
|
||||
int ret, err;
|
||||
unsigned int ret;
|
||||
int err;
|
||||
|
||||
g_return_val_if_fail(handle != NULL, -1);
|
||||
g_return_val_if_fail(buf != NULL, -1);
|
||||
|
|
@ -289,13 +290,14 @@ int net_receive(GIOChannel *handle, char *buf, int len)
|
|||
if (err == G_IO_ERROR_AGAIN || (err != 0 && errno == EINTR))
|
||||
return 0; /* no bytes received */
|
||||
|
||||
return err == 0 ? ret : -1;
|
||||
return err == 0 ? (int)ret : -1;
|
||||
}
|
||||
|
||||
/* Transmit data, return number of bytes sent, -1 = error */
|
||||
int net_transmit(GIOChannel *handle, const char *data, int len)
|
||||
{
|
||||
int ret, err;
|
||||
unsigned int ret;
|
||||
int err;
|
||||
|
||||
g_return_val_if_fail(handle != NULL, -1);
|
||||
g_return_val_if_fail(data != NULL, -1);
|
||||
|
|
@ -305,7 +307,7 @@ int net_transmit(GIOChannel *handle, const char *data, int len)
|
|||
(err != 0 && (errno == EINTR || errno == EPIPE)))
|
||||
return 0;
|
||||
|
||||
return err == 0 ? ret : -1;
|
||||
return err == 0 ? (int)ret : -1;
|
||||
}
|
||||
|
||||
/* Get socket address/port */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue