diff options
author | Max Kellermann <max@duempel.org> | 2013-10-19 18:48:38 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-19 18:48:38 +0200 |
commit | ff626ac76357940b2f0ac5cb243a68ac13df0f8a (patch) | |
tree | 493888a28950f75f5e254c0ded9dc9703ee83dc3 /src/ClientWrite.cxx | |
parent | 59f8144c50765189594d5932fc25869f9ea6e265 (diff) | |
download | mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.gz mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.xz mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.zip |
*: use references instead of pointers
Diffstat (limited to 'src/ClientWrite.cxx')
-rw-r--r-- | src/ClientWrite.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ClientWrite.cxx b/src/ClientWrite.cxx index 547f72bb5..e66197eb7 100644 --- a/src/ClientWrite.cxx +++ b/src/ClientWrite.cxx @@ -27,23 +27,23 @@ * Write a block of data to the client. */ static void -client_write(Client *client, const char *data, size_t length) +client_write(Client &client, const char *data, size_t length) { /* if the client is going to be closed, do nothing */ - if (client->IsExpired() || length == 0) + if (client.IsExpired() || length == 0) return; - client->Write(data, length); + client.Write(data, length); } void -client_puts(Client *client, const char *s) +client_puts(Client &client, const char *s) { client_write(client, s, strlen(s)); } void -client_vprintf(Client *client, const char *fmt, va_list args) +client_vprintf(Client &client, const char *fmt, va_list args) { char *p = FormatNewV(fmt, args); client_write(client, p, strlen(p)); @@ -51,7 +51,7 @@ client_vprintf(Client *client, const char *fmt, va_list args) } void -client_printf(Client *client, const char *fmt, ...) +client_printf(Client &client, const char *fmt, ...) { va_list args; |