mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-07 14:20:29 +00:00
Fixed up some castings.
This commit is contained in:
parent
f5b91cd03d
commit
c3dfd63bf3
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#ifdef USE_ZLIB
|
#ifdef USE_ZLIB
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: conn-zip.c,v 1.2 2002/12/30 17:15:06 alex Exp $";
|
static char UNUSED id[] = "$Id: conn-zip.c,v 1.3 2003/04/21 10:52:26 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -114,9 +114,9 @@ Zip_Flush( CONN_ID Idx )
|
|||||||
|
|
||||||
out = &My_Connections[Idx].zip.out;
|
out = &My_Connections[Idx].zip.out;
|
||||||
|
|
||||||
out->next_in = My_Connections[Idx].zip.wbuf;
|
out->next_in = (VOID *)My_Connections[Idx].zip.wbuf;
|
||||||
out->avail_in = My_Connections[Idx].zip.wdatalen;
|
out->avail_in = My_Connections[Idx].zip.wdatalen;
|
||||||
out->next_out = My_Connections[Idx].wbuf + My_Connections[Idx].wdatalen;
|
out->next_out = (VOID *)(My_Connections[Idx].wbuf + My_Connections[Idx].wdatalen);
|
||||||
out->avail_out = WRITEBUFFER_LEN - My_Connections[Idx].wdatalen;
|
out->avail_out = WRITEBUFFER_LEN - My_Connections[Idx].wdatalen;
|
||||||
|
|
||||||
result = deflate( out, Z_SYNC_FLUSH );
|
result = deflate( out, Z_SYNC_FLUSH );
|
||||||
@ -153,9 +153,9 @@ Unzip_Buffer( CONN_ID Idx )
|
|||||||
|
|
||||||
in = &My_Connections[Idx].zip.in;
|
in = &My_Connections[Idx].zip.in;
|
||||||
|
|
||||||
in->next_in = My_Connections[Idx].zip.rbuf;
|
in->next_in = (VOID *)My_Connections[Idx].zip.rbuf;
|
||||||
in->avail_in = My_Connections[Idx].zip.rdatalen;
|
in->avail_in = My_Connections[Idx].zip.rdatalen;
|
||||||
in->next_out = My_Connections[Idx].rbuf + My_Connections[Idx].rdatalen;
|
in->next_out = (VOID *)(My_Connections[Idx].rbuf + My_Connections[Idx].rdatalen);
|
||||||
in->avail_out = READBUFFER_LEN - My_Connections[Idx].rdatalen - 1;
|
in->avail_out = READBUFFER_LEN - My_Connections[Idx].rdatalen - 1;
|
||||||
|
|
||||||
result = inflate( in, Z_SYNC_FLUSH );
|
result = inflate( in, Z_SYNC_FLUSH );
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: conn.c,v 1.121 2003/03/31 15:54:21 alex Exp $";
|
static char UNUSED id[] = "$Id: conn.c,v 1.122 2003/04/21 10:52:26 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -798,6 +798,7 @@ Handle_Write( CONN_ID Idx )
|
|||||||
/* Daten aus Schreibpuffer versenden bzw. Connection aufbauen */
|
/* Daten aus Schreibpuffer versenden bzw. Connection aufbauen */
|
||||||
|
|
||||||
INT len, res, err;
|
INT len, res, err;
|
||||||
|
socklen_t sock_len;
|
||||||
CLIENT *c;
|
CLIENT *c;
|
||||||
|
|
||||||
assert( Idx > NONE );
|
assert( Idx > NONE );
|
||||||
@ -811,9 +812,9 @@ Handle_Write( CONN_ID Idx )
|
|||||||
FD_CLR( My_Connections[Idx].sock, &My_Connects );
|
FD_CLR( My_Connections[Idx].sock, &My_Connects );
|
||||||
|
|
||||||
/* Ergebnis des connect() ermitteln */
|
/* Ergebnis des connect() ermitteln */
|
||||||
len = sizeof( err );
|
sock_len = sizeof( err );
|
||||||
res = getsockopt( My_Connections[Idx].sock, SOL_SOCKET, SO_ERROR, &err, &len );
|
res = getsockopt( My_Connections[Idx].sock, SOL_SOCKET, SO_ERROR, &err, &sock_len );
|
||||||
assert( len == sizeof( err ));
|
assert( sock_len == sizeof( err ));
|
||||||
|
|
||||||
/* Fehler aufgetreten? */
|
/* Fehler aufgetreten? */
|
||||||
if(( res != 0 ) || ( err != 0 ))
|
if(( res != 0 ) || ( err != 0 ))
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: resolve.c,v 1.5 2002/12/26 17:04:54 alex Exp $";
|
static char UNUSED id[] = "$Id: resolve.c,v 1.6 2003/04/21 10:52:51 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -186,7 +186,7 @@ Do_ResolveAddr( struct sockaddr_in *Addr, INT w_fd )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Antwort an Parent schreiben */
|
/* Antwort an Parent schreiben */
|
||||||
if( write( w_fd, hostname, strlen( hostname ) + 1 ) != ( strlen( hostname ) + 1 ))
|
if( (size_t)write( w_fd, hostname, strlen( hostname ) + 1 ) != (size_t)( strlen( hostname ) + 1 ))
|
||||||
{
|
{
|
||||||
Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent: %s!", strerror( errno ));
|
Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent: %s!", strerror( errno ));
|
||||||
close( w_fd );
|
close( w_fd );
|
||||||
@ -226,7 +226,7 @@ Do_ResolveName( CHAR *Host, INT w_fd )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Antwort an Parent schreiben */
|
/* Antwort an Parent schreiben */
|
||||||
if( write( w_fd, ip, strlen( ip ) + 1 ) != ( strlen( ip ) + 1 ))
|
if( (size_t)write( w_fd, ip, strlen( ip ) + 1 ) != (size_t)( strlen( ip ) + 1 ))
|
||||||
{
|
{
|
||||||
Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent: %s!", strerror( errno ));
|
Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent: %s!", strerror( errno ));
|
||||||
close( w_fd );
|
close( w_fd );
|
||||||
|
Loading…
Reference in New Issue
Block a user