]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix off-by-one error in definition of MAX_LINENO and MAX_LOC_SIZE.
authorJulian Seward <jseward@acm.org>
Thu, 9 May 2002 01:32:57 +0000 (01:32 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 9 May 2002 01:32:57 +0000 (01:32 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@239

coregrind/vg_symtab2.c
vg_symtab2.c

index cc37053862ce59b50cd3e370e174756cc2df4df3..d7257a408584eb59f770dff1a73be2f205149a2d 100644 (file)
@@ -83,10 +83,10 @@ typedef
 
 #define LINENO_BITS     20
 #define LOC_SIZE_BITS  (32 - LINENO_BITS)
-#define MAX_LINENO     (1 << LINENO_BITS)
+#define MAX_LINENO     ((1 << LINENO_BITS) - 1)
 
 /* Unlikely to have any lines with instruction ranges > 4096 bytes */
-#define MAX_LOC_SIZE   (1 << LOC_SIZE_BITS)
+#define MAX_LOC_SIZE   ((1 << LOC_SIZE_BITS) - 1)
 
 /* Number used to detect line number overflows;  if one line is 60000-odd
  * smaller than the previous, is was probably an overflow.  
index cc37053862ce59b50cd3e370e174756cc2df4df3..d7257a408584eb59f770dff1a73be2f205149a2d 100644 (file)
@@ -83,10 +83,10 @@ typedef
 
 #define LINENO_BITS     20
 #define LOC_SIZE_BITS  (32 - LINENO_BITS)
-#define MAX_LINENO     (1 << LINENO_BITS)
+#define MAX_LINENO     ((1 << LINENO_BITS) - 1)
 
 /* Unlikely to have any lines with instruction ranges > 4096 bytes */
-#define MAX_LOC_SIZE   (1 << LOC_SIZE_BITS)
+#define MAX_LOC_SIZE   ((1 << LOC_SIZE_BITS) - 1)
 
 /* Number used to detect line number overflows;  if one line is 60000-odd
  * smaller than the previous, is was probably an overflow.