]> granicus.if.org Git - graphviz/commitdiff
lefty: consistently treat 'OTINCR' as a 'long'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Sep 2021 02:02:56 +0000 (19:02 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 27 Sep 2021 14:45:27 +0000 (07:45 -0700)
cmd/lefty/mem.c

index bf1817ac7daa8247c9f4317b67df47fd557443b9..ceeb8db23ed68cdd90b11abdd15a80b619d2873f 100644 (file)
@@ -44,7 +44,7 @@ static void **markarray;
 static long markn, marki;
 
 #define OTSIZE sizeof (void *)
-#define OTINCR 1000
+#define OTINCR 1000l
 static void **otarray[2];
 static long otn, oti, otj;
 static char otarea[2];
@@ -83,8 +83,8 @@ void Minit (void (*func) (void)) {
     markarray = Marrayalloc ((long) MARKINCR * MARKSIZE);
     markn = MARKINCR;
     marki = 0;
-    otarray[0] = Marrayalloc ((long) OTINCR * OTSIZE);
-    otarray[1] = Marrayalloc ((long) OTINCR * OTSIZE);
+    otarray[0] = Marrayalloc(OTINCR * OTSIZE);
+    otarray[1] = Marrayalloc(OTINCR * OTSIZE);
     otn = OTINCR;
     oti = otj = 0;
     otarea[0] = 1, otarea[1] = 2;
@@ -261,8 +261,8 @@ void Mmkcurr (void *p) {
     if (!p || M_AREAOF (p) == otarea[0])
         return;
     if (oti >= otn) {
-        otarray[0] = Marraygrow (otarray[0], (long) (otn +OTINCR) * OTSIZE);
-        otarray[1] = Marraygrow (otarray[1], (long) (otn +OTINCR) * OTSIZE);
+        otarray[0] = Marraygrow(otarray[0], (otn + OTINCR) * OTSIZE);
+        otarray[1] = Marraygrow(otarray[1], (otn + OTINCR) * OTSIZE);
         otn += OTINCR;
     }
     otarray[0][oti++] = p;