[systemd-commits] 2 commits - src/network src/shared

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Wed Dec 3 14:52:03 PST 2014


 src/network/networkctl.c |    3 +--
 src/shared/util.c        |    6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 6c03d27d9f7e831194dbd8bd6bcdeef9273edb6e
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Wed Dec 3 23:50:38 2014 +0100

    networkctl: remove unused variable

diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index a763630..3e304b2 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -529,8 +529,7 @@ static void dump_list(const char *prefix, char **l) {
 
 static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) {
         _cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **domains = NULL;
-        _cleanup_free_ char *setup_state = NULL, *operational_state = NULL, *gateway = NULL, *gateway_description = NULL,
-                            *gateway6 = NULL, *gateway6_description = NULL;
+        _cleanup_free_ char *setup_state = NULL, *operational_state = NULL;
         _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
         _cleanup_udev_device_unref_ struct udev_device *d = NULL;
         _cleanup_udev_hwdb_unref_ struct udev_hwdb *hwdb = NULL;

commit e706d931e0f5741d57c6f3752b4e3520f90f47d5
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Sun Nov 30 00:37:16 2014 +0100

    util: don't shadow variable
    
    environ is already defined in unistd.h

diff --git a/src/shared/util.c b/src/shared/util.c
index 4fcbab9..f01cdd7 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -955,7 +955,7 @@ int get_process_root(pid_t pid, char **root) {
         return get_process_link_contents(p, root);
 }
 
-int get_process_environ(pid_t pid, char **environ) {
+int get_process_environ(pid_t pid, char **env) {
         _cleanup_fclose_ FILE *f = NULL;
         _cleanup_free_ char *outcome = NULL;
         int c;
@@ -963,7 +963,7 @@ int get_process_environ(pid_t pid, char **environ) {
         size_t allocated = 0, sz = 0;
 
         assert(pid >= 0);
-        assert(environ);
+        assert(env);
 
         p = procfs_file_alloca(pid, "environ");
 
@@ -982,7 +982,7 @@ int get_process_environ(pid_t pid, char **environ) {
         }
 
         outcome[sz] = '\0';
-        *environ = outcome;
+        *env = outcome;
         outcome = NULL;
 
         return 0;



More information about the systemd-commits mailing list