Module Name: src
Committed By: kamil
Date: Sat Feb 22 00:38:15 UTC 2020
Modified Files:
src/lib/libc/gdtoa: gethex.c
Log Message:
Avoid unportable left shift construct
left shift of 9 by 28 places cannot be represented in type 'int'
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gdtoa/gethex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/gdtoa/gethex.c
diff -u src/lib/libc/gdtoa/gethex.c:1.6 src/lib/libc/gdtoa/gethex.c:1.7
--- src/lib/libc/gdtoa/gethex.c:1.6 Fri Apr 19 10:41:53 2013
+++ src/lib/libc/gdtoa/gethex.c Sat Feb 22 00:38:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: gethex.c,v 1.6 2013/04/19 10:41:53 joerg Exp $ */
+/* $NetBSD: gethex.c,v 1.7 2020/02/22 00:38:14 kamil Exp $ */
/****************************************************************
@@ -209,7 +209,7 @@ gethex( CONST char **sp, CONST FPI *fpi,
L = 0;
n = 0;
}
- L |= (hexdig[(unsigned char)*s1] & 0x0f) << n;
+ L |= (unsigned int)(hexdig[(unsigned char)*s1] & 0x0f) << n;
n += 4;
}
*x++ = L;