more fixes
This commit is contained in:
parent
3e2cc98337
commit
c838c0b304
@ -10,9 +10,7 @@ int main(int argc, char **argv){
|
||||
int s;
|
||||
if(argc != 2){
|
||||
usage: write(2, "Usage: ", 7);
|
||||
if(argv[0] == NULL)
|
||||
argv[0] = program_name;
|
||||
fdprint(2, argv[0]);
|
||||
fdprint(2, argv[0] == NULL ? program_name : argv[0]);
|
||||
write(2, " [seconds]\n", 11);
|
||||
return EX_USAGE;
|
||||
}
|
||||
|
@ -37,11 +37,6 @@ error: write(2, "Usage: ", 7);
|
||||
return EX_USAGE;
|
||||
}
|
||||
|
||||
/* We could skip checking the first two characters and replace it with
|
||||
* a single if(argv[1][0] == 'i' && argv[1][1] == 's') or something
|
||||
* but it's simpler to just waste the cycles. Plus this doesn't assume
|
||||
* every ctype starts with "is". */
|
||||
|
||||
for(ctype = 0; ctype < ARRAYLEN(ctypes); ++ctype)
|
||||
if(strcmp(argv[1], ctypes[ctype].name) == 0)
|
||||
goto pass;
|
||||
|
Loading…
Reference in New Issue
Block a user