]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
_dbus_auth_return_buffer(): remove unused argument
authorChengwei Yang <chengwei.yang@intel.com>
Mon, 11 Nov 2013 09:52:26 +0000 (17:52 +0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 6 Jan 2014 15:58:11 +0000 (15:58 +0000)
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>
dbus/dbus-auth-script.c
dbus/dbus-auth.c
dbus/dbus-auth.h
dbus/dbus-transport-socket.c

index c1f0c88ec7e7994d81b01149becffc374bd00c11..164743b0b60376bc3b51a5a50ffcbc038a999ee0 100644 (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);
index a0f72773a32b040cb395ad3e64bcf1aa587724df..6a07665f52ac50d517e5810ed37736ce40ea4638 100644 (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);
index ae3f364788530da32d410dcbd8f7c38add07570f..ba1975f717245246d0a019789988f620e9ad9e3f 100644 (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);
index 44c7af7df6d6183ba4d99e24a72cc8b8ca4a82ff..774f4598f30721eaadcafb0b1fe619a598ee9aa2 100644 (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)
     {