On 07/31/2017 04:34 AM, Han Han wrote:
commit 41788f6f6a0c3a2c7b30cc2818e118b828ee2a70 (HEAD -> master)
Author: Han Han <hhan@redhat.com>
Date:   Mon Jul 31 16:21:27 2017 +0800

    Fix dead assignment in function modprobed_alias_bond
   
    Drop the line since value stored to 'r' is not used.

NACK. It's not the value of r that is important, it's what aug_set does to the config file. aug_set sets the variable at "path" to the value in "name".

(the author just liked storing all return status values even when he didn't use them. It serves no purpose, but also does no harm, and any extra work is probably optimized out by the compiler anyway.)


diff --git a/src/dutil_linux.c b/src/dutil_linux.c
index 742153a..ff51cb8 100644
--- a/src/dutil_linux.c
+++ b/src/dutil_linux.c
@@ -485,7 +485,6 @@ void modprobed_alias_bond(struct netcf *ncf, const char *name) {
             r = aug_insert(aug, path, "alias", 0);
             ERR_COND_BAIL(r < 0, ncf, EOTHER);
         }
-        r = aug_set(aug, path, name);
         FREE(path);
     }
 


--
Han Han
Associate Quality Engineer
Redhat

Email: hhan@redhat.com
Phone: +861065339333


_______________________________________________
netcf-devel mailing list -- netcf-devel@lists.fedorahosted.org
To unsubscribe send an email to netcf-devel-leave@lists.fedorahosted.org