commit - bfa48f3448a140048386810f97049ad8200c1842
commit + 8fd0e29d463c934756dce7a562f09ea831b5d968
blob - b412cc83af6e2789b03b2e34f7b74b4c962f8f1c
blob + 0367a1f75848b4d9766425d7e6021b3e8f8bf9a9
--- src/ipaddr/ng_ipaddr.c
+++ src/ipaddr/ng_ipaddr.c
if (*str == ':') {
char tmp[NG_INET_ADDRSTRLEN] = "0";
ret = getnameinfo(sa, ng_ipaddr_salen(addr),
- tmp+1, sizeof(tmp) -1, NULL, 0, NI_NUMERICHOST);
+ tmp + 1, (socklen_t)sizeof(tmp) - 1,
+ NULL, 0, NI_NUMERICHOST);
if (ret == 0)
strlcpy(str, tmp, NG_INET_ADDRSTRLEN);
}
blob - 6490a0747a9ac0f62ff4608c8d7cbaea9e8023a5
blob + 32b1ec0fc8897b00e05fa7b47d2a8e8e95a28f09
--- src/ipaddr/ng_ipaddr.h
+++ src/ipaddr/ng_ipaddr.h
#ifdef WANT_IPV6
assert(a->sa.sa_family == AF_INET || a->sa.sa_family == AF_INET6);
if (a->sa.sa_family == AF_INET6)
- return sizeof(a->sin6);
+ return (socklen_t)sizeof(a->sin6);
#endif
assert(a->sin4.sin_family == AF_INET);
- return sizeof(a->sin4);
+ return (socklen_t)sizeof(a->sin4);
}
#endif
/* -eof- */
-
blob - 6f8507244501853c7b72b767864e5b250bd3fcf3
blob + 6e9e0f478c235040d502b38363115bb677acff5f
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
return false;
}
- while (fgets(line, sizeof(line), fd) != NULL) {
+ while (fgets(line, (int)sizeof(line), fd) != NULL) {
ngt_TrimStr(line);
if (! (nick = strchr(line, ':')))
continue;
blob - 1d1bb482d43cc4c3f5da606ac540cf40cd75afca
blob + 71f0fe8ee81551c8e843f7927937f48e938a0176
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* must be separated by "," */
ptr = strtok( Arg, "," );
while (ptr) {
- ngt_TrimStr( ptr );
- port = atol( ptr );
+ ngt_TrimStr(ptr);
+ port = atoi(ptr);
if (port > 0 && port < 0xFFFF) {
port16 = (UINT16) port;
if (!array_catb(a, (char*)&port16, sizeof port16))
static bool
no_listenports(void)
{
- unsigned int cnt = array_bytes(&Conf_ListenPorts);
+ size_t cnt = array_bytes(&Conf_ListenPorts);
#ifdef SSL_SUPPORT
cnt += array_bytes(&Conf_SSLOptions.ListenPorts);
#endif
blob - 06d655bf345bbc0f47de2546fd13ad458a02273a
blob + d6ad1e7bef972f412490d561ced2f42b4f7e9819
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2007 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
assert( what & IO_WANTWRITE);
/* connect() finished, get result. */
- sock_len = sizeof( err );
+ sock_len = (socklen_t)sizeof(err);
res = getsockopt( My_Connections[idx].sock, SOL_SOCKET, SO_ERROR, &err, &sock_len );
assert( sock_len == sizeof( err ));
if (af != AF_INET6)
return;
- if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)))
+ if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, (socklen_t)sizeof(on)))
Log(LOG_ERR, "Could not set IPV6_V6ONLY: %s", strerror(errno));
#else
(void)af;
return 0;
}
- len_processed += len;
+ len_processed += (unsigned int)len;
if (len <= delta) {
/* Request is empty (only '\r\n', '\r' or '\n');
* delta is 2 ('\r\n') or 1 ('\r' or '\n'), see above */
return Conn_OPTION_ISSET(&My_Connections[Idx], CONN_SSL);
}
#endif
+
+
/* -eof- */
blob - 5e9140206e83f2e621a1bdb8a085ab88e98e50e8
blob + 983c88448d9a9cb004c8b38dcd233c1a4696d923
--- src/ngircd/conn.h
+++ src/ngircd/conn.h
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2008 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 by Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define CONN_SSL_WANT_READ 128 /* SSL/TLS library needs to read protocol data */
#define CONN_SSL_FLAGS_ALL (CONN_SSL_CONNECT|CONN_SSL|CONN_SSL_WANT_WRITE|CONN_SSL_WANT_READ)
#endif
-typedef int CONN_ID;
+typedef long CONN_ID;
#include "client.h"
#endif
#endif
+
/* -eof- */
blob - d9aa79bb1f1b93478a9f1dd7c0e135ac7ed62408
blob + 1b2f4e678b412df818c53d81a7c7c91dc2f753f6
--- src/ngircd/hash.c
+++ src/ngircd/hash.c
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
char buffer[LINE_LEN];
- strlcpy( buffer, String, sizeof( buffer ));
- return jenkins_hash( (UINT8 *)ngt_LowerStr( buffer ), strlen( buffer ), 42 );
+ strlcpy(buffer, String, sizeof(buffer));
+ return jenkins_hash((UINT8 *)ngt_LowerStr(buffer),
+ (UINT32)strlen(buffer), 42);
} /* Hash */
blob - f57a6a190d5c0a9e57b4f0ee315e349814cc609b
blob + 5a8555a0606f8095229feffffc48dda6efab0d92
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
remain = diff * d;
*t -= remain;
- return diff;
+ return (unsigned int)diff;
}
blob - e7f73ad5c3c32cf801ce891c15fa1a45689fcad5
blob + 20077a41d45e8e7e6865672ccaaa333b7a513571
--- src/ngircd/resolve.c
+++ src/ngircd/resolve.c
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 by Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*resbuf = 0;
res = getnameinfo((struct sockaddr *) IpAddr, ng_ipaddr_salen(IpAddr),
- resbuf, reslen, NULL, 0, NI_NAMEREQD);
+ resbuf, (socklen_t)reslen, NULL, 0, NI_NAMEREQD);
if (res == 0)
return true;
Resolve_Shutdown(s);
return (size_t)bytes_read;
}
-/* -eof- */
+
+/* -eof- */
blob - a24c160279e77bd5e482b10dbc65d20edd25302e
blob + c973539c987d0c0a5c5c716c356e354cf4df6325
--- src/tool/tool.c
+++ src/tool/tool.c
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* If last character in the string matches Chr, remove it.
* Empty strings are handled correctly. */
- unsigned int len;
+ size_t len;
- assert( String != NULL );
+ assert(String != NULL);
- len = strlen( String );
- if( len == 0 ) return;
+ len = strlen(String);
+ if(len == 0)
+ return;
len--;
- if( String[len] == Chr ) String[len] = '\0';
+ if(String[len] == Chr)
+ String[len] = '\0';
} /* ngt_TrimLastChr */
+
/* -eof- */