Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2018 00:34:19 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336153 - head/sys/kern
Message-ID:  <201807100034.w6A0YJa1068136@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Tue Jul 10 00:34:19 2018
New Revision: 336153
URL: https://svnweb.freebsd.org/changeset/base/336153

Log:
  subr_hints: Convert some bool-like ints to bools

Modified:
  head/sys/kern/subr_hints.c

Modified: head/sys/kern/subr_hints.c
==============================================================================
--- head/sys/kern/subr_hints.c	Tue Jul 10 00:33:31 2018	(r336152)
+++ head/sys/kern/subr_hints.c	Tue Jul 10 00:34:19 2018	(r336153)
@@ -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.
@@ -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 */
@@ -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;
 
 
 	/*
@@ -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
@@ -199,7 +200,7 @@ found:
 	} 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807100034.w6A0YJa1068136>