From 4e40ee49bba3f7bab05a58516e2039351fb33069 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Sat, 18 May 2013 11:35:10 -0700 Subject: Replaced vsnprintf with VAFORMAT pretty much everywhere. --- src/helperfuncs.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/helperfuncs.cpp') 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 -- cgit v1.2.3