diff options
author | dillon <dillon@FreeBSD.org> | 1999-02-14 20:58:21 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-02-14 20:58:21 +0000 |
commit | 14f2cd7f1f8671a4b9d087659654425235793e7a (patch) | |
tree | 213098cc14da00287ae4d84b3e9f3d54923a5ffc | |
parent | 1c6e740053731732fee8859bb98031bac6e154e4 (diff) | |
download | FreeBSD-src-14f2cd7f1f8671a4b9d087659654425235793e7a.zip FreeBSD-src-14f2cd7f1f8671a4b9d087659654425235793e7a.tar.gz |
Only needed to cast array index from char to unsigned char, did not
also have to cast it to int. (int)(unsigned char)char_exp ->
(unsigned char)char_exp.
-rw-r--r-- | sys/kern/subr_scanf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_scanf.c b/sys/kern/subr_scanf.c index b24d7ba..6d65d98 100644 --- a/sys/kern/subr_scanf.c +++ b/sys/kern/subr_scanf.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: subr_scanf.c,v 1.3 1999/01/28 00:57:47 dillon Exp $ + * $Id: subr_scanf.c,v 1.4 1999/01/29 08:09:32 dillon Exp $ * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp */ @@ -323,7 +323,7 @@ literal: /* take only those things in the class */ if (flags & SUPPRESS) { n = 0; - while (ccltab[(int)(unsigned char)*inp]) { + while (ccltab[(unsigned char)*inp]) { n++, inr--, inp++; if (--width == 0) break; @@ -337,7 +337,7 @@ literal: goto match_failure; } else { p0 = p = va_arg(ap, char *); - while (ccltab[(int)(unsigned char)*inp]) { + while (ccltab[(unsigned char)*inp]) { inr--; *p++ = *inp++; if (--width == 0) |