Hi all,

This is a code readability patch for openrcs (src/usr.bin/rcs/rlog.c). I previously sent this to nicm@ but he didn't have time for it.
Any comments?

- Michael


--- rlog.c      2010/07/30 21:47:18     1.64
+++ rlog.c      2011/06/30 05:40:10
@@ -493,13 +493,16 @@
                }
        }

-       /* XXX dirty... */
-       if ((((slist != NULL && wflag == 1) ||
-           (slist != NULL && lflag == 1) ||
-           (lflag == 1 && wflag == 1)) && found < 2) ||
-           (((slist != NULL && lflag == 1 && wflag == 1) ||
-           (slist != NULL || lflag == 1 || wflag == 1)) && found == 0))
-               return;
+       if (found == 0) {
+               if (slist != NULL || wflag == 1 || lflag == 1)
+                       return;
+       }
+       else if (found < 2) {
+               if (slist != NULL && (wflag == 1 || lflag == 1))
+                       return;
+               if (wflag == 1 && lflag == 1)
+                       return;
+       }

        printf("%s\n", REVSEP);

Reply via email to