Remove empty-argument checks
This code removes code which could only be hit be running awesome --search '' or awesome -c ''. In both cases there are many possibilities for weird/invalid arguments and I don't see why the empty string deserves special treatment. Note that awesome --search does NOT hit this code, because getopt_long handles the case of "completely missing" arguments itself. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
fd90061c24
commit
4cbf87b441
10
awesome.c
10
awesome.c
|
@ -507,16 +507,10 @@ main(int argc, char **argv)
|
||||||
run_test = true;
|
run_test = true;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
if(a_strlen(optarg))
|
confpath = a_strdup(optarg);
|
||||||
confpath = a_strdup(optarg);
|
|
||||||
else
|
|
||||||
fatal("-c option requires a file name");
|
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
if(a_strlen(optarg))
|
string_array_append(&searchpath, a_strdup(optarg));
|
||||||
string_array_append(&searchpath, a_strdup(optarg));
|
|
||||||
else
|
|
||||||
fatal("-s option requires a directory name");
|
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
no_argb = true;
|
no_argb = true;
|
||||||
|
|
Loading…
Reference in New Issue