1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:04:47 +02:00

Abolish the few remaining uses of BUFSIZE.

This commit is contained in:
Sadie Powell
2026-03-23 02:14:51 +00:00
parent d3395a5d39
commit e002f39509
7 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ public:
int err = regcomp(&this->regbuf, expr.c_str(), REG_EXTENDED | REG_NOSUB | REG_ICASE);
if (err)
{
char buf[BUFSIZE];
char buf[256];
regerror(err, &this->regbuf, buf, sizeof(buf));
regfree(&this->regbuf);
throw RegexException("Error in regex " + expr + ": " + buf);
+1 -1
View File
@@ -37,7 +37,7 @@ public:
int err = regcomp(&this->regbuf, expr.c_str(), REG_EXTENDED | REG_NOSUB);
if (err)
{
char buf[BUFSIZE];
char buf[256];
regerror(err, &this->regbuf, buf, sizeof(buf));
regfree(&this->regbuf);
throw RegexException("Error in regex " + expr + ": " + buf);
+1 -1
View File
@@ -39,7 +39,7 @@ bool StaticFileServer::OnRequest(HTTP::Provider *server, const Anope::string &pa
reply.headers["Cache-Control"] = "public";
int i;
char buffer[BUFSIZE];
char buffer[1024];
while ((i = read(fd, buffer, sizeof(buffer))) > 0)
reply.Write(buffer, i);
+1 -1
View File
@@ -107,7 +107,7 @@ void TemplateFileServer::Serve(HTTP::Provider *server, const Anope::string &page
Anope::string buf;
int i;
char buffer[BUFSIZE];
char buffer[1024];
while ((i = read(fd, buffer, sizeof(buffer) - 1)) > 0)
{
buffer[i] = 0;