diff options
author | Daniel Vassdal <shutter@canternet.org> | 2013-05-18 11:35:10 -0700 |
---|---|---|
committer | Daniel Vassdal <shutter@canternet.org> | 2013-05-18 14:01:21 -0700 |
commit | 4e40ee49bba3f7bab05a58516e2039351fb33069 (patch) | |
tree | 73961818b96646cfbe0a0ff945a23db04edc4823 /src/helperfuncs.cpp | |
parent | 42ae4790815734dca6357d3b69f2aca604316aa3 (diff) |
Replaced vsnprintf with VAFORMAT pretty much everywhere.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r-- | src/helperfuncs.cpp | 10 |
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 |