aboutsummaryrefslogtreecommitdiff
path: root/nand-utils
diff options
context:
space:
mode:
Diffstat (limited to 'nand-utils')
-rw-r--r--nand-utils/nandtest.c4
-rw-r--r--nand-utils/nftl_format.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/nand-utils/nandtest.c b/nand-utils/nandtest.c
index d5c7369..06dec25 100644
--- a/nand-utils/nandtest.c
+++ b/nand-utils/nandtest.c
@@ -17,7 +17,7 @@
#include "mtd/mtd-user.h"
#include "common.h"
-static void usage(int status)
+static NORETURN void usage(int status)
{
fprintf(status ? stderr : stdout,
"usage: %s [OPTIONS] <device>\n\n"
@@ -184,14 +184,12 @@ int main(int argc, char **argv)
switch (c) {
case 'h':
usage(EXIT_SUCCESS);
- break;
case 'V':
common_print_version();
exit(EXIT_SUCCESS);
break;
case '?':
usage(EXIT_FAILURE);
- break;
case 'm':
markbad = 1;
diff --git a/nand-utils/nftl_format.c b/nand-utils/nftl_format.c
index ec87604..c8b8b50 100644
--- a/nand-utils/nftl_format.c
+++ b/nand-utils/nftl_format.c
@@ -198,7 +198,7 @@ static int checkbbt(void)
return (0);
}
-static void usage(int rc)
+static NORETURN void usage(int rc)
{
fprintf(stderr, "Usage: %s [-ib] <mtddevice> [<start offset> [<size>]]\n", PROGRAM_NAME);
exit(rc);
@@ -250,13 +250,11 @@ int main(int argc, char **argv)
case 'h':
case '?':
usage(EXIT_SUCCESS);
- break;
case 'V':
display_version();
break;
default:
usage(EXIT_FAILURE);
- break;
}
}