Richard W.M. Jones
2020-May-19 14:32 UTC
[Libguestfs] [PATCH nbdkit] sh: Don't need to cast parameter of ascii_is* to (unsigned char).
Our replacements for these functions are not undefined for negative values. Thanks: Eric Blake Fixes: commit 9f34db74786fdc92b290a7d47e4b003bd84fec69. --- plugins/sh/call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sh/call.c b/plugins/sh/call.c index b2d4a794..741022b6 100644 --- a/plugins/sh/call.c +++ b/plugins/sh/call.c @@ -443,7 +443,7 @@ handle_script_error (const char *argv0, char *ebuf, size_t len) } if (skip && ebuf[skip]) { - if (!ascii_isspace ((unsigned char) ebuf[skip])) { + if (!ascii_isspace (ebuf[skip])) { /* Treat 'EINVALID' as EIO, not EINVAL */ err = EIO; skip = 0; @@ -451,7 +451,7 @@ handle_script_error (const char *argv0, char *ebuf, size_t len) else do skip++; - while (ascii_isspace ((unsigned char) ebuf[skip])); + while (ascii_isspace (ebuf[skip])); } while (len > 0 && ebuf[len-1] == '\n') -- 2.25.0
Eric Blake
2020-May-19 14:48 UTC
Re: [Libguestfs] [PATCH nbdkit] sh: Don't need to cast parameter of ascii_is* to (unsigned char).
On 5/19/20 9:32 AM, Richard W.M. Jones wrote:> Our replacements for these functions are not undefined for negative > values. > > Thanks: Eric Blake > Fixes: commit 9f34db74786fdc92b290a7d47e4b003bd84fec69. > --- > plugins/sh/call.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)LGTM -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Maybe Matching Threads
- [nbdkit PATCH] sh: Parse a larger number of error messages
- [PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
- [nbdkit PATCH] sh: Allow pwrite to not consume all data
- [nbdkit PATCH] sh: Allow pwrite to not consume all data
- [nbdkit PATCH] sh: Allow pwrite to not consume all data