summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorDaniel Vassdal <shutter@canternet.org>2013-05-18 11:35:10 -0700
committerDaniel Vassdal <shutter@canternet.org>2013-05-18 14:01:21 -0700
commit4e40ee49bba3f7bab05a58516e2039351fb33069 (patch)
tree73961818b96646cfbe0a0ff945a23db04edc4823 /src/helperfuncs.cpp
parent42ae4790815734dca6357d3b69f2aca604316aa3 (diff)
Replaced vsnprintf with VAFORMAT pretty much everywhere.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index c097b0033..0673efedf 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -372,13 +372,9 @@ void InspIRCd::SendWhoisLine(User* user, User* dest, int numeric, const std::str
void InspIRCd::SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...)
{
- char textbuffer[MAXBUF];
- va_list argsPtr;
- va_start (argsPtr, format);
- vsnprintf(textbuffer, MAXBUF, format, argsPtr);
- va_end(argsPtr);
-
- this->SendWhoisLine(user, dest, numeric, std::string(textbuffer));
+ std::string textbuffer;
+ VAFORMAT(textbuffer, format, format)
+ this->SendWhoisLine(user, dest, numeric, textbuffer);
}
/** Refactored by Brain, Jun 2009. Much faster with some clever O(1) array