Commit 2dac3ef5 authored by Max Kellermann's avatar Max Kellermann

client: eliminate client_printf()

parent 86c7ab29
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment