Skip to content

Commit

Permalink
subr_hints: Convert some bool-like ints to bools
Browse files Browse the repository at this point in the history
  • Loading branch information
kevans91 committed Jul 10, 2018
1 parent c20614b commit 54ff118
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sys/kern/subr_hints.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
* has already been setup (dynamic_kenv) and that we have added any supplied
* static_hints to the dynamic environment.
*/
static int hintenv_merged;
static bool hintenv_merged;

/*
* Access functions for device resources.
Expand Down Expand Up @@ -84,7 +84,7 @@ static_hints_to_env(void *data __unused)
free(line, M_TEMP);
cp += i + 1;
}
hintenv_merged = 1;
hintenv_merged = true;
}

/* Any time after dynamic env is setup */
Expand Down Expand Up @@ -124,13 +124,14 @@ res_find(char **hintp_cookie, int *line, int *startln,
const char **ret_name, int *ret_namelen, int *ret_unit,
const char **ret_resname, int *ret_resnamelen, const char **ret_value)
{
int dyn_used = 0, fbacklvl = FBACK_MDENV, i = 0, n = 0;
int fbacklvl = FBACK_MDENV, i = 0, n = 0;
char r_name[32];
int r_unit;
char r_resname[32];
char r_value[128];
const char *s, *cp;
char *hintp, *p;
bool dyn_used = false;


/*
Expand All @@ -157,7 +158,7 @@ res_find(char **hintp_cookie, int *line, int *startln,
}
}
mtx_unlock(&kenv_lock);
dyn_used = 1;
dyn_used = true;
} else {
/*
* We'll have a chance to keep coming back here until
Expand Down Expand Up @@ -199,7 +200,7 @@ res_find(char **hintp_cookie, int *line, int *startln,
} else {
hintp = *hintp_cookie;
if (hintenv_merged && hintp == kenvp[0])
dyn_used = 1;
dyn_used = true;
else
/*
* If we aren't using the dynamic environment, we need
Expand Down

0 comments on commit 54ff118

Please sign in to comment.