From 7daf068c4bbf581a898891e130c244eb9707b32a Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 21 Apr 2014 17:04:24 +0200 Subject: SBUS: several trivial style fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In SSSD we tend to use {} brackets around single-line blocks, too to make sure we don't forget to add them should the block become larger. We also don't add a space between function name and the opening "(". Reviewed-by: Pavel Březina Reviewed-by: Stef Walter (cherry picked from commit 3d5908ed0faf400a5c7d9c3e4312597ee1b7786a) --- src/sbus/sssd_dbus_connection.c | 2 +- src/sbus/sssd_dbus_meta.c | 9 ++++++--- src/sbus/sssd_dbus_request.c | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c index ab18049f8..da7f8dc86 100644 --- a/src/sbus/sssd_dbus_connection.c +++ b/src/sbus/sssd_dbus_connection.c @@ -301,7 +301,7 @@ DBusConnection *sbus_get_connection(struct sbus_connection *conn) return conn->dbus.conn; } -void sbus_disconnect (struct sbus_connection *conn) +void sbus_disconnect(struct sbus_connection *conn) { if (conn == NULL) { return; diff --git a/src/sbus/sssd_dbus_meta.c b/src/sbus/sssd_dbus_meta.c index 57123b743..76e192f71 100644 --- a/src/sbus/sssd_dbus_meta.c +++ b/src/sbus/sssd_dbus_meta.c @@ -28,8 +28,9 @@ sbus_meta_find_method(const struct sbus_interface_meta *interface, const struct sbus_method_meta *method; for (method = interface->methods; method && method->name; method++) { - if (strcmp(method_name, method->name) == 0) + if (strcmp(method_name, method->name) == 0) { return method; + } } return NULL; @@ -42,8 +43,9 @@ sbus_meta_find_signal(const struct sbus_interface_meta *interface, const struct sbus_signal_meta *signal; for (signal = interface->signals; signal && signal->name; signal++) { - if (strcmp(signal_name, signal->name) == 0) + if (strcmp(signal_name, signal->name) == 0) { return signal; + } } return NULL; @@ -56,8 +58,9 @@ sbus_meta_find_property(const struct sbus_interface_meta *interface, const struct sbus_property_meta *property; for (property = interface->properties; property && property->name; property++) { - if (strcmp(property_name, property->name) == 0) + if (strcmp(property_name, property->name) == 0) { return property; + } } return NULL; diff --git a/src/sbus/sssd_dbus_request.c b/src/sbus/sssd_dbus_request.c index 387691dea..342d8dfd2 100644 --- a/src/sbus/sssd_dbus_request.c +++ b/src/sbus/sssd_dbus_request.c @@ -185,7 +185,7 @@ parent_dbus_string_arrays(struct sbus_request *request, int first_arg_type, arg_type == DBUS_TYPE_SIGNATURE) { array_arg = talloc_zero(request, struct array_arg); - if(array_arg == NULL) { + if (array_arg == NULL) { /* no kidding ... */ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory while trying not to leak memory\n"); return false; @@ -222,7 +222,7 @@ sbus_request_parse_or_finish(struct sbus_request *request, if (dbus_message_get_args_valist(request->message, &error, first_arg_type, va)) { - ret = parent_dbus_string_arrays (request, first_arg_type, va2); + ret = parent_dbus_string_arrays(request, first_arg_type, va2); } else { /* Trying to send the error back to the caller in this case is a joke */ -- cgit