File: ecache.c.patch

package info (click to toggle)
sjeng 11.2-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,436 kB
  • sloc: ansic: 13,378; sh: 324; makefile: 29
file content (43 lines) | stat: -rw-r--r-- 892 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Author: Lukas Geyer <lukas@debian.org>
Description: Made all score variables long int,
             fixed format mismatches in printf().
Bugs: #192902

--- sjeng-11.2.orig/ecache.c
+++ sjeng-11.2/ecache.c
@@ -29,7 +29,7 @@
 {
 unsigned long stored_hash;
 unsigned long hold_hash;
-unsigned int score;
+long int score;
 } ECacheType;
 
 /*ECacheType ECache[ECACHESIZE];*/
@@ -40,7 +40,7 @@
 
 void storeECache(long int score)
 {
-  int index;
+  unsigned int index;
 
   index = hash % ECacheSize;
 
@@ -51,7 +51,7 @@
 
 void checkECache(long int *score, int *in_cache)
 {
-  int index;
+  unsigned int index;
 
   ECacheProbes++;
 
@@ -84,7 +84,7 @@
     exit(EXIT_FAILURE);
   }
   
-  printf("Allocated %lu eval cache entries, totalling %lu bytes.\n",
+  printf("Allocated %u eval cache entries, totalling %zu bytes.\n",
           ECacheSize, sizeof(ECacheType)*ECacheSize);
   return;
 }