mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
Add unsigned char cast to isspace arg
This commit is contained in:
parent
c12c023aa4
commit
49435560cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52856
@ -32,6 +32,8 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -682,7 +684,7 @@ cgetnext(bp, db_array)
|
||||
slash = 0;
|
||||
continue;
|
||||
}
|
||||
if (isspace(*line) ||
|
||||
if (isspace((unsigned char)*line) ||
|
||||
*line == ':' || *line == '#' || slash) {
|
||||
if (line[len - 2] == '\\')
|
||||
slash = 1;
|
||||
|
@ -32,6 +32,8 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -283,16 +285,16 @@ static int _listmatch(list, group, len)
|
||||
int glen = strlen(group);
|
||||
|
||||
/* skip possible leading whitespace */
|
||||
while(isspace(*ptr))
|
||||
while(isspace((unsigned char)*ptr))
|
||||
ptr++;
|
||||
|
||||
while (ptr < list + len) {
|
||||
cptr = ptr;
|
||||
while(*ptr != ',' && *ptr != '\0' && !isspace(*ptr))
|
||||
while(*ptr != ',' && *ptr != '\0' && !isspace((unsigned char)*ptr))
|
||||
ptr++;
|
||||
if (strncmp(cptr, group, glen) == 0 && glen == (ptr - cptr))
|
||||
return(1);
|
||||
while(*ptr == ',' || isspace(*ptr))
|
||||
while(*ptr == ',' || isspace((unsigned char)*ptr))
|
||||
ptr++;
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,8 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -92,13 +94,13 @@ getttyent()
|
||||
if (!fgets(&line[i], lbsize - i, tf))
|
||||
return (NULL);
|
||||
}
|
||||
while (isspace(*p))
|
||||
while (isspace((unsigned char)*p))
|
||||
++p;
|
||||
if (*p && *p != '#')
|
||||
break;
|
||||
}
|
||||
|
||||
#define scmp(e) !strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1])
|
||||
#define scmp(e) !strncmp(p, e, sizeof(e) - 1) && isspace((unsigned char)p[sizeof(e) - 1])
|
||||
#define vcmp(e) !strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '='
|
||||
|
||||
zapchar = 0;
|
||||
|
@ -29,6 +29,8 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -127,7 +129,7 @@ initshells()
|
||||
if (*cp == '#' || *cp == '\0')
|
||||
continue;
|
||||
*sp++ = cp;
|
||||
while (!isspace(*cp) && *cp != '#' && *cp != '\0')
|
||||
while (!isspace((unsigned char)*cp) && *cp != '#' && *cp != '\0')
|
||||
cp++;
|
||||
*cp++ = '\0';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user