client: eliminate client_printf()
This commit is contained in:
parent
86c7ab29f4
commit
2dac3ef58e
|
@ -241,11 +241,4 @@ void
|
|||
client_new(EventLoop &loop, Partition &partition,
|
||||
UniqueSocketDescriptor fd, SocketAddress address, int uid) noexcept;
|
||||
|
||||
/**
|
||||
* Write a printf-like formatted string to the client.
|
||||
*/
|
||||
gcc_printf(2,3)
|
||||
void
|
||||
client_printf(Client &client, const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,11 +19,8 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "Client.hxx"
|
||||
#include "util/FormatString.hxx"
|
||||
#include "util/AllocatedString.hxx"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
bool
|
||||
Client::Write(const void *data, size_t length)
|
||||
|
@ -37,19 +34,3 @@ Client::Write(const char *data)
|
|||
{
|
||||
return Write(data, strlen(data));
|
||||
}
|
||||
|
||||
static void
|
||||
client_vprintf(Client &client, const char *fmt, va_list args)
|
||||
{
|
||||
client.Write(FormatStringV(fmt, args).c_str());
|
||||
}
|
||||
|
||||
void
|
||||
client_printf(Client &client, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
client_vprintf(client, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue