tweak structure
This commit is contained in:
parent
ed85da3785
commit
771d26b32c
@ -8,15 +8,16 @@ static char *program_name = "retval";
|
|||||||
int main(int argc, char *argv[]){
|
int main(int argc, char *argv[]){
|
||||||
unsigned int s;
|
unsigned int s;
|
||||||
|
|
||||||
if(argc < 2){
|
if(argc < 2)
|
||||||
usage: fprintf(stderr, "Usage: %s [status]\n", argv[0] == NULL ? program_name : argv[0]);
|
goto usage;
|
||||||
return EX_USAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
s = strtol(argv[1], &argv[1], 10);
|
s = strtol(argv[1], &argv[1], 10);
|
||||||
if(*argv[1] != '\0' || errno != 0)
|
if(*argv[1] != '\0' || errno != 0){
|
||||||
goto usage;
|
usage: fprintf(stderr, "Usage: %s [status]\n",
|
||||||
|
argv[0] == NULL ? program_name : argv[0]);
|
||||||
|
return EX_USAGE;
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user