Code cleanup

This commit is contained in:
Pierre Pronchery 2009-10-19 21:26:05 +00:00
parent 76e27ba17e
commit efc86bfdaf
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* $Id$ */
/* Copyright (c) 2007 Pierre Pronchery <khorben@defora.org> */
/* Copyright (c) 2009 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Unix utils */
/* utils is not free software; you can redistribute it and/or modify it under
* the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0
@ -164,6 +164,7 @@ static int _usage(void)
return 1;
}
/* main */
int main(int argc, char * argv[])
{
@ -175,5 +176,5 @@ int main(int argc, char * argv[])
default:
return _usage();
}
return _cksum(argc - optind, &argv[optind]) == 0 ? 0 : 2;
return (_cksum(argc - optind, &argv[optind]) == 0) ? 0 : 2;
}

View File

@ -1,5 +1,5 @@
/* $Id$ */
/* Copyright (c) 2007 Pierre Pronchery <khorben@defora.org> */
/* Copyright (c) 2009 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Unix utils */
/* utils is not free software; you can redistribute it and/or modify it under
* the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0
@ -141,5 +141,5 @@ int main(int argc, char * argv[])
}
if(argc - optind != 2)
return _usage();
return _cmp(ot, argv[optind], argv[optind+1]) == 0 ? 0 : 2;
return (_cmp(ot, argv[optind], argv[optind + 1]) == 0) ? 0 : 2;
}