diff options
author | Thomas Heijligen <thomas.heijligen@secunet.com> | 2022-08-08 22:19:33 +0200 |
---|---|---|
committer | Thomas Heijligen <src@posteo.de> | 2022-09-01 20:33:17 +0000 |
commit | b6f3c00fbdec538154d4424da4ed117366ccae7e (patch) | |
tree | ff2e44447a68b0e808bee6de93d47c3ee88c7cb3 /util | |
parent | 650f0824310fb3b70dd5bfa259fc28aedae877c5 (diff) | |
download | flashrom-b6f3c00fbdec538154d4424da4ed117366ccae7e.tar.gz flashrom-b6f3c00fbdec538154d4424da4ed117366ccae7e.tar.bz2 flashrom-b6f3c00fbdec538154d4424da4ed117366ccae7e.zip |
layout.c: Cast argument of isspace() to unsigned char
These functions [isspace, etc] check whether c [(the argument)], which
must have the value of an unsigned char or EOF, falls into a certain
character class according to the current locale.
Cast the argument from `char` to `unsigned char` to guarantee that
we don't pass illegal negative values. Some implementations actually
provide a warning to get heads up[1].
[1] https://man.netbsd.org/ctype.3#CAVEATS
TEST=Builds on Cygwin (Windows 10, amd64, gcc 11.3.0)
Change-Id: Ia48d5a19b0964bc28e5360edf06bdf287dad5945
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66548
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions