From: Martin Wilck <mwilck@xxxxxxxx> getopt() never returns 1, and sizeof(optarg) is always sizeof(char *). Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- multipath/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/multipath/main.c b/multipath/main.c index 9625e97..b7986de 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -842,11 +842,8 @@ main (int argc, char *argv[]) condlog(1, "failed to register cleanup handler for vecs: %m"); while ((arg = getopt(argc, argv, ":adDcChl::eFfM:v:p:b:BrR:itTquUwW")) != EOF ) { switch(arg) { - case 1: printf("optarg : %s\n",optarg); - break; case 'v': - if (sizeof(optarg) > sizeof(char *) || - !isdigit(optarg[0])) { + if (!isdigit(optarg[0])) { usage (argv[0]); exit(RTVL_FAIL); } -- 2.33.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel