From a5108de49fc74f186c1d9ae7e57ad1ca2243196e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 29 Apr 2011 16:01:59 +0100 Subject: [PATCH] _dbus_message_remove_counter: remove ability to return the link This is no longer used. --- dbus/dbus-connection.c | 6 ++---- dbus/dbus-message-internal.h | 3 +-- dbus/dbus-message.c | 11 ++--------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 04b246a..665c1b2 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -656,7 +656,7 @@ _dbus_connection_message_sent_unlocked (DBusConnection *connection, /* It's OK that in principle we call the notify function, because for the * outgoing limit, there isn't one */ - _dbus_message_remove_counter (message, connection->outgoing_counter, NULL); + _dbus_message_remove_counter (message, connection->outgoing_counter); /* The message will actually be unreffed when we unlock */ } @@ -2662,9 +2662,7 @@ free_outgoing_message (void *element, DBusMessage *message = element; DBusConnection *connection = data; - _dbus_message_remove_counter (message, - connection->outgoing_counter, - NULL); + _dbus_message_remove_counter (message, connection->outgoing_counter); dbus_message_unref (message); } diff --git a/dbus/dbus-message-internal.h b/dbus/dbus-message-internal.h index 870934b..d4e8a6c 100644 --- a/dbus/dbus-message-internal.h +++ b/dbus/dbus-message-internal.h @@ -46,8 +46,7 @@ dbus_bool_t _dbus_message_add_counter (DBusMessage *message, void _dbus_message_add_counter_link (DBusMessage *message, DBusList *link); void _dbus_message_remove_counter (DBusMessage *message, - DBusCounter *counter, - DBusList **link_return); + DBusCounter *counter); DBusMessageLoader* _dbus_message_loader_new (void); DBusMessageLoader* _dbus_message_loader_ref (DBusMessageLoader *loader); diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 083cc4d..198fbd7 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -295,13 +295,11 @@ _dbus_message_add_counter (DBusMessage *message, * decrements the counter by the size/unix fds of this message. * * @param message the message - * @param link_return return the link used * @param counter the counter */ void _dbus_message_remove_counter (DBusMessage *message, - DBusCounter *counter, - DBusList **link_return) + DBusCounter *counter) { DBusList *link; @@ -309,12 +307,7 @@ _dbus_message_remove_counter (DBusMessage *message, counter); _dbus_assert (link != NULL); - _dbus_list_unlink (&message->counters, - link); - if (link_return) - *link_return = link; - else - _dbus_list_free_link (link); + _dbus_list_remove_link (&message->counters, link); _dbus_counter_adjust_size (counter, - message->size_counter_delta); -- 1.7.4.4