checkpath: fix bool values

Use true/false for bool values instead of 0/1.

Reported-by: <vapier@gentoo.org>
This commit is contained in:
William Hubbs 2012-10-09 18:55:09 -05:00
parent 6f345abe91
commit b68d4b3580

View File

@ -223,20 +223,20 @@ checkpath(int argc, char **argv)
struct group *gr = NULL; struct group *gr = NULL;
inode_t type = inode_unknown; inode_t type = inode_unknown;
int retval = EXIT_SUCCESS; int retval = EXIT_SUCCESS;
bool trunc = 0; bool trunc = false;
bool chowner = 0; bool chowner = false;
while ((opt = getopt_long(argc, argv, getoptstring, while ((opt = getopt_long(argc, argv, getoptstring,
longopts, (int *) 0)) != -1) longopts, (int *) 0)) != -1)
{ {
switch (opt) { switch (opt) {
case 'D': case 'D':
trunc = 1; trunc = true;
case 'd': case 'd':
type = inode_dir; type = inode_dir;
break; break;
case 'F': case 'F':
trunc = 1; trunc = true;
case 'f': case 'f':
type = inode_file; type = inode_file;
break; break;
@ -249,7 +249,7 @@ checkpath(int argc, char **argv)
applet, optarg); applet, optarg);
break; break;
case 'o': case 'o':
chowner = 1; chowner = true;
if (parse_owner(&pw, &gr, optarg) != 0) if (parse_owner(&pw, &gr, optarg) != 0)
eerrorx("%s: owner `%s' not found", eerrorx("%s: owner `%s' not found",
applet, optarg); applet, optarg);