summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-11-11 17:52:26 +0800
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-01-06 15:58:11 +0000
commitb2a517040cd6f0fcc676abe833675d5473820226 (patch)
treed5cfbd5d785ebe9f3565aaf70c5750ee7c02c1e4
parent14d72882c9b03bb5c2f96646847b4c9e431168b1 (diff)
downloaddbus-b2a517040cd6f0fcc676abe833675d5473820226.tar.gz
_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>
-rw-r--r--dbus/dbus-auth-script.c4
-rw-r--r--dbus/dbus-auth.c4
-rw-r--r--dbus/dbus-auth.h3
-rw-r--r--dbus/dbus-transport-socket.c3
4 files changed, 5 insertions, 9 deletions
diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c
index c1f0c88e..164743b0 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 a0f72773..6a07665f 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 ae3f3647..ba1975f7 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 44c7af7d..774f4598 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)
{