From: Simon McVittie Date: Fri, 5 Aug 2011 12:40:44 +0000 (+0100) Subject: Use {}, not semicolon, when the statement of an "if" does nothing X-Git-Tag: dbus-1.5.8~5^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86b0ba0278f527143fe5785ca819e45b94937474;p=thirdparty%2Fdbus.git Use {}, not semicolon, when the statement of an "if" does nothing The uses in bus/activation.c are also probably wrong because they ignore the result of the test, but that's orthogonal. () --- diff --git a/bus/activation.c b/bus/activation.c index 6101173fa..dea624337 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -2535,14 +2535,18 @@ bus_activation_service_reload_test (const DBusString *test_data_dir) _dbus_assert_not_reached ("could not initiate service reload test"); if (!do_service_reload_test (&directory, FALSE)) - ; /* Do nothing? */ + { + /* Do nothing? */ + } /* Do OOM tests */ if (!init_service_reload_test (&directory)) _dbus_assert_not_reached ("could not initiate service reload test"); if (!do_service_reload_test (&directory, TRUE)) - ; /* Do nothing? */ + { + /* Do nothing? */ + } /* Cleanup test directory */ if (!cleanup_service_reload_test (&directory)) diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index a4652a3e4..9f6be2652 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -1103,7 +1103,9 @@ babysit (pid_t grandchild_pid, { char b; if (read (sigchld_pipe[READ_END], &b, 1) == -1) - /* ignore */; + { + /* ignore */ + } /* do waitpid check */ check_babysit_events (grandchild_pid, parent_pipe, 0); }