Module: ngircd.git Branch: master Commit: 80d0613bf256f48b1dd20bface4c52b57cff8d28 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=80d06...
Author: Federico G. Schwindt fgsch@lodoss.net Date: Wed Nov 6 18:16:05 2013 +0000
Use sizeof() intead of the explicit size
---
src/ngircd/irc-write.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/ngircd/irc-write.c b/src/ngircd/irc-write.c index 25cecaf..5503344 100644 --- a/src/ngircd/irc-write.c +++ b/src/ngircd/irc-write.c @@ -70,7 +70,7 @@ va_dcl #else va_start(ap); #endif - vsnprintf(buffer, 1000, Format, ap); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end(ap);
IRC_SetPenalty(Client, 2); @@ -107,7 +107,7 @@ va_dcl #else va_start(ap); #endif - vsnprintf(buffer, 1000, Format, ap); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end(ap);
return IRC_WriteStrClientPrefix(Client, Client_ThisServer(), @@ -148,7 +148,7 @@ va_dcl #else va_start( ap ); #endif - vsnprintf( buffer, 1000, Format, ap ); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end( ap );
return Conn_WriteStr(Client_Conn(Client_NextHop(Client)), ":%s %s", @@ -190,7 +190,7 @@ va_dcl #else va_start( ap ); #endif - vsnprintf( buffer, 1000, Format, ap ); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end( ap );
IRC_WriteStrChannelPrefix(Client, Chan, Client_ThisServer(), @@ -239,7 +239,7 @@ va_dcl #else va_start( ap ); #endif - vsnprintf( buffer, 1000, Format, ap ); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end( ap );
Conn_ClearFlags( ); @@ -296,7 +296,7 @@ va_dcl #else va_start( ap ); #endif - vsnprintf( buffer, 1000, Format, ap ); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end( ap );
IRC_WriteStrServersPrefix(ExceptOf, Client_ThisServer(), "%s", buffer); @@ -333,7 +333,7 @@ va_dcl #else va_start( ap ); #endif - vsnprintf( buffer, 1000, Format, ap ); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end( ap );
IRC_WriteStrServersPrefixFlag( ExceptOf, Prefix, '\0', "%s", buffer ); @@ -373,7 +373,7 @@ va_dcl #else va_start( ap ); #endif - vsnprintf( buffer, 1000, Format, ap ); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end( ap );
IRC_WriteStrServersPrefixFlag_CB(ExceptOf, Prefix, Flag, @@ -451,7 +451,7 @@ va_dcl #else va_start( ap ); #endif - vsnprintf( buffer, 1000, Format, ap ); + vsnprintf(buffer, sizeof(buffer), Format, ap); va_end( ap );
Conn_ClearFlags( ); @@ -513,7 +513,7 @@ va_dcl #else va_start(ap); #endif - vsnprintf(msg, 1000, Format, ap); + vsnprintf(msg, sizeof(msg), Format, ap); va_end(ap);
for (to=Client_First(); to != NULL; to=Client_Next(to)) {
ngircd-commits@lists.barton.de