From 728ce012ca52872706899bb6d6c4e379cd55b131 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Mon, 11 Nov 2013 17:52:26 +0800 Subject: [PATCH] _dbus_auth_return_buffer(): remove unused argument The argument bytes_read of _dbus_auth_return_buffer() function isn't used at all, so remove it. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71477 --- dbus/dbus-auth-script.c | 4 ++-- dbus/dbus-auth.c | 4 +--- dbus/dbus-auth.h | 3 +-- dbus/dbus-transport-socket.c | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c index c1f0c88..164743b 100644 --- a/dbus/dbus-auth-script.c +++ b/dbus/dbus-auth-script.c @@ -584,11 +584,11 @@ _dbus_auth_script_run (const DBusString *filename) { _dbus_warn ("not enough memory to call bytes_received, or can't add bytes to auth object already in end state\n"); _dbus_string_free (&to_send); - _dbus_auth_return_buffer (auth, buffer, 0); + _dbus_auth_return_buffer (auth, buffer); goto out; } - _dbus_auth_return_buffer (auth, buffer, _dbus_string_get_length (&to_send)); + _dbus_auth_return_buffer (auth, buffer); } _dbus_string_free (&to_send); diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index a0f7277..6a07665 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -2533,12 +2533,10 @@ _dbus_auth_get_buffer (DBusAuth *auth, * * @param auth the auth conversation * @param buffer the buffer being returned - * @param bytes_read number of new bytes added */ void _dbus_auth_return_buffer (DBusAuth *auth, - DBusString *buffer, - int bytes_read) + DBusString *buffer) { _dbus_assert (buffer == &auth->incoming); _dbus_assert (auth->buffer_outstanding); diff --git a/dbus/dbus-auth.h b/dbus/dbus-auth.h index ae3f364..ba1975f 100644 --- a/dbus/dbus-auth.h +++ b/dbus/dbus-auth.h @@ -55,8 +55,7 @@ void _dbus_auth_bytes_sent (DBusAuth *auth, void _dbus_auth_get_buffer (DBusAuth *auth, DBusString **buffer); void _dbus_auth_return_buffer (DBusAuth *auth, - DBusString *buffer, - int bytes_read); + DBusString *buffer); void _dbus_auth_get_unused_bytes (DBusAuth *auth, const DBusString **str); void _dbus_auth_delete_unused_bytes (DBusAuth *auth); diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 44c7af7..774f459 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -255,8 +255,7 @@ read_data_into_auth (DBusTransport *transport, bytes_read = _dbus_read_socket (socket_transport->fd, buffer, socket_transport->max_bytes_read_per_iteration); - _dbus_auth_return_buffer (transport->auth, buffer, - bytes_read > 0 ? bytes_read : 0); + _dbus_auth_return_buffer (transport->auth, buffer); if (bytes_read > 0) { -- 1.7.9.5