[PATCH] - Code cleanup - handling of --serial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good afternoon,
currently in loader.c we have:

     if (FL_RESCUE(flags)) {
         *argptr++ = "--rescue";
         if (FL_SERIAL(flags))
             *argptr++ = "--serial";
     } else {
         if (FL_SERIAL(flags))
             *argptr++ = "--serial";
...

The attached patch moves the if(FL_SERIAL) section above this piece of code. No need to have the same block of code twice in an if-else statement.

Thanks,
Alexander.
diff --git a/loader2/loader.c b/loader2/loader.c
index 2740ae4..fb1738b 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -1995,13 +1995,12 @@ int main(int argc, char ** argv) {
     if (FL_NOIPV6(flags))
         *argptr++ = "--noipv6";
 
+    if (FL_SERIAL(flags))
+        *argptr++ = "--serial";
+
     if (FL_RESCUE(flags)) {
         *argptr++ = "--rescue";
-        if (FL_SERIAL(flags))
-            *argptr++ = "--serial";
     } else {
-        if (FL_SERIAL(flags))
-            *argptr++ = "--serial";
         if (FL_TEXT(flags))
             *argptr++ = "-T";
         else if (FL_GRAPHICAL(flags))
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux