Whamcloud - gitweb
freefrag: fix up getopt case statement
authorEric Sandeen <sandeen@redhat.com>
Fri, 16 Sep 2011 20:49:25 +0000 (15:49 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Sep 2011 22:43:05 +0000 (18:43 -0400)
There is no need to print out a "bad option" message; getopt
does that for us, and in fact will change "c" to "?" so
it's not even useful.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/e2freefrag.c

index e6fd67e..419c6fc 100644 (file)
@@ -282,10 +282,8 @@ int main(int argc, char *argv[])
                        }
                        chunk_info.chunkbytes *= 1024;
                        break;
-               default:
-                       fprintf(stderr, "%s: bad option '%c'\n",
-                               progname, c);
                case 'h':
+               default:
                        usage(progname);
                        break;
                }