]> git.pld-linux.org Git - packages/ash.git/commitdiff
- patch from rawhide. ash-0_2-24
authorkloczek <kloczek@pld-linux.org>
Tue, 18 Jul 2000 13:04:18 +0000 (13:04 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ash-mksyntax.patch -> 1.1

ash-mksyntax.patch [new file with mode: 0644]

diff --git a/ash-mksyntax.patch b/ash-mksyntax.patch
new file mode 100644 (file)
index 0000000..5da100d
--- /dev/null
@@ -0,0 +1,26 @@
+The code in question had undefined behaviour in C.
+
+--- ash-linux-0.2/mksyntax.c.jj        Tue Aug 24 11:12:52 1993
++++ ash-linux-0.2/mksyntax.c   Wed Jun 21 08:43:03 2000
+@@ -107,7 +107,7 @@ int digit_contig;  /* true if digits are 
+ main() {
+       char c;
+-      char d;
++      unsigned char d, e;
+       int sign;
+       int i;
+       char buf[80];
+@@ -132,9 +132,10 @@ main() {
+               sign = 1;
+       else
+               sign = 0;
+-      for (nbits = 1 ; ; nbits++) {
++      e = -1;
++      for (nbits = 1 ; nbits < 31; nbits++) {
+               d = (1 << nbits) - 1;
+-              if (d == c)
++              if (d == e)
+                       break;
+       }
+       printf("%s %d bit chars\n", sign? "signed" : "unsigned", nbits);
This page took 0.170965 seconds and 4 git commands to generate.