[systemd-commits] 2 commits - src/core src/journal-remote src/network

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Fri Dec 12 12:58:04 PST 2014


 src/core/load-fragment.c            |    6 ++++--
 src/journal-remote/journal-remote.c |    4 ++--
 src/network/networkctl.c            |    1 -
 3 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit b7378b89d233ee0b5e27618b5bd15010faa12de5
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Fri Dec 12 21:53:28 2014 +0100

    networkctl: remove unused variable

diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index a2511fd..b56a728 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -669,7 +669,6 @@ static int link_status(char **args, unsigned n) {
         if (n <= 1 && !arg_all) {
                 _cleanup_free_ char *operational_state = NULL;
                 _cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **domains = NULL;
-                _cleanup_free_ struct local_address *addresses = NULL;
                 const char *on_color_operational, *off_color_operational;
 
                 sd_network_get_operational_state(&operational_state);

commit abc08d4d08006fa19dec645859f81af9f227339e
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Fri Dec 12 19:51:41 2014 +0100

    wrap a few *_FOREACH macros in curly braces
    
    cppcheck would give up with "syntax error" without them. This led
    to reports of syntax errors in unrelated locations and potentially
    hid other errors

diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 3fbe680..8e5be87 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3586,7 +3586,7 @@ int unit_load_fragment(Unit *u) {
                 return r;
 
         /* Try to find an alias we can load this with */
-        if (u->load_state == UNIT_STUB)
+        if (u->load_state == UNIT_STUB) {
                 SET_FOREACH(t, u->names, i) {
 
                         if (t == u->id)
@@ -3599,6 +3599,7 @@ int unit_load_fragment(Unit *u) {
                         if (u->load_state != UNIT_STUB)
                                 break;
                 }
+        }
 
         /* And now, try looking for it under the suggested (originally linked) path */
         if (u->load_state == UNIT_STUB && u->fragment_path) {
@@ -3628,7 +3629,7 @@ int unit_load_fragment(Unit *u) {
                 if (r < 0)
                         return r;
 
-                if (u->load_state == UNIT_STUB)
+                if (u->load_state == UNIT_STUB) {
                         SET_FOREACH(t, u->names, i) {
                                 _cleanup_free_ char *z = NULL;
 
@@ -3646,6 +3647,7 @@ int unit_load_fragment(Unit *u) {
                                 if (u->load_state != UNIT_STUB)
                                         break;
                         }
+                }
         }
 
         return 0;
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 6ec5ad2..5050616 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -1469,13 +1469,13 @@ static int setup_gnutls_logger(char **categories) {
 
                 gnutls_global_set_log_function(log_func_gnutls);
 
-                if (categories)
+                if (categories) {
                         STRV_FOREACH(cat, categories) {
                                 r = log_enable_gnutls_category(*cat);
                                 if (r < 0)
                                         return r;
                         }
-                else
+                } else
                         log_reset_gnutls_level();
         }
 #endif



More information about the systemd-commits mailing list