Source-Changes-HG archive

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

[src/trunk]: src/bin/dd dd: clean up function summary



details:   https://anonhg.NetBSD.org/src/rev/b09d2310f8c2
branches:  trunk
changeset: 1024091:b09d2310f8c2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 09 20:44:55 2021 +0000

description:
dd: clean up function summary

No functional change. Ideally the binary would have stayed the same, but
GCC 10.3.0 inserts a nop and reorders the code.

diffstat:

 bin/dd/misc.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (35 lines):

diff -r 16a395bf196f -r b09d2310f8c2 bin/dd/misc.c
--- a/bin/dd/misc.c     Sat Oct 09 20:29:23 2021 +0000
+++ b/bin/dd/misc.c     Sat Oct 09 20:44:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.25 2021/10/09 20:29:23 rillig Exp $ */
+/*     $NetBSD: misc.c,v 1.26 2021/10/09 20:44:55 rillig Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)misc.c     8.3 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: misc.c,v 1.25 2021/10/09 20:29:23 rillig Exp $");
+__RCSID("$NetBSD: misc.c,v 1.26 2021/10/09 20:44:55 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -78,13 +78,11 @@
 #ifdef NO_MSGFMT
        posix_summary();
 #else /* NO_MSGFMT */
-       if (strcmp(msgfmt, "human") == 0) {
+       if (strcmp(msgfmt, "human") == 0)
                human_summary();
-               return;
-       } else if (strcmp(msgfmt, "posix") == 0) {
+       else if (strcmp(msgfmt, "posix") == 0)
                posix_summary();
-               return;
-       } else if (strcmp(msgfmt, "quiet") == 0)
+       else if (strcmp(msgfmt, "quiet") == 0)
                quiet_summary();
        else
                custom_summary();



Home | Main Index | Thread Index | Old Index