style(9) - Prefer a lack of case '?' fallthrough for getopt
authorSamuel J. Greear <sjg@thesjg.com>
Fri, 10 Dec 2010 06:35:33 +0000 (06:35 +0000)
committerSamuel J. Greear <sjg@thesjg.com>
Fri, 10 Dec 2010 06:38:26 +0000 (06:38 +0000)
* This also coincides with the example in getopt(3)

Discussed-with: swildner@

share/man/man9/style.9
sys/platform/vkernel/platform/init.c
sys/platform/vkernel64/platform/init.c

index c06e70a..aa28138 100644 (file)
@@ -339,9 +339,7 @@ Elements in a
 .Ic switch
 statement that cascade should have a
 .Li FALLTHROUGH
-comment, unless they contain no code of their own, as in the
-.Ic case '?'
-element in the example below.
+comment, unless they contain no code of their own.
 Numerical arguments should be checked for accuracy.
 Code that cannot be reached should have a
 .Li NOTREACHED
@@ -363,7 +361,6 @@ comment.
                                usage();
                        }
                        break;
-               case '?':
                default:
                        usage();
                        /* NOTREACHED */
index ea500ec..7e49187 100644 (file)
@@ -313,7 +313,6 @@ main(int ac, char **av)
                case 'h':
                        usage_help(true);
                        break;
-               case '?':
                default:
                        usage_help(false);
                }
index bcd8d64..7218859 100644 (file)
@@ -311,7 +311,6 @@ main(int ac, char **av)
                case 'h':
                        usage_help(true);
                        break;
-               case '?':
                default:
                        usage_help(false);
                }