]> git.pld-linux.org Git - packages/ash.git/blame - ash-mksyntax.patch
- changed %%{!?debug:...}%%{?debug...} to %%{?debug:...}%%{!?debug...}
[packages/ash.git] / ash-mksyntax.patch
CommitLineData
71e38c42 1The code in question had undefined behaviour in C.
2
3--- ash-linux-0.2/mksyntax.c.jj Tue Aug 24 11:12:52 1993
4+++ ash-linux-0.2/mksyntax.c Wed Jun 21 08:43:03 2000
5@@ -107,7 +107,7 @@ int digit_contig; /* true if digits are
6
7 main() {
8 char c;
9- char d;
10+ unsigned char d, e;
11 int sign;
12 int i;
13 char buf[80];
14@@ -132,9 +132,10 @@ main() {
15 sign = 1;
16 else
17 sign = 0;
18- for (nbits = 1 ; ; nbits++) {
19+ e = -1;
20+ for (nbits = 1 ; nbits < 31; nbits++) {
21 d = (1 << nbits) - 1;
22- if (d == c)
23+ if (d == e)
24 break;
25 }
26 printf("%s %d bit chars\n", sign? "signed" : "unsigned", nbits);
This page took 0.084658 seconds and 4 git commands to generate.