_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
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Chengwei Yang 2013-11-11 17:52:26 +08:00 committed by Simon McVittie
parent 14d72882c9
commit b2a517040c
4 changed files with 5 additions and 9 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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)
{