]> granicus.if.org Git - graphviz/commitdiff
remove unused 'type' argument to vmresize
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 11 Jul 2020 22:22:08 +0000 (15:22 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Jul 2020 18:54:37 +0000 (11:54 -0700)
lib/expr/exeval.c
lib/vmalloc/vmalloc.h
lib/vmalloc/vmbest.c
lib/vmalloc/vmhdr.h

index 2069a612ee12754404d8c11819dd059463ea7988..07084b27b9672a0122ac01dcf6d4f6e39e349007 100644 (file)
@@ -1941,7 +1941,7 @@ char *exstring(Expr_t * ex, char *s)
  */
 void *exstralloc(Expr_t * ex, void *p, size_t sz)
 {
-    return vmresize(ex->ve, p, sz, VM_RSCOPY | VM_RSMOVE);
+    return vmresize(ex->ve, p, sz);
 }
 
 /* exstrfree:
index d2e9a7f3a62d3cb6d3b7ed722479d2c78fdec751..8678a9f5de0e8b12615a7df69e57a5e0bde03ef6 100644 (file)
@@ -59,7 +59,7 @@ extern "C" {
 
     struct _vmethod_s {
        void *(*allocf) (Vmalloc_t *, size_t);
-       void *(*resizef) (Vmalloc_t *, void *, size_t, int);
+       void *(*resizef) (Vmalloc_t *, void *, size_t);
        int (*freef) (Vmalloc_t *, void *);
        long (*addrf) (Vmalloc_t *, void *);
        unsigned short meth;
@@ -108,7 +108,7 @@ extern "C" {
     extern int vmclear(Vmalloc_t *);
 
     extern void *vmalloc(Vmalloc_t *, size_t);
-    extern void *vmresize(Vmalloc_t *, void *, size_t, int);
+    extern void *vmresize(Vmalloc_t *, void *, size_t);
     extern int vmfree(Vmalloc_t *, void *);
 
     extern long vmaddr(Vmalloc_t *, void *);
@@ -123,17 +123,15 @@ extern "C" {
 #define vmalloc(vm,sz)         (*(_VM_(vm)->meth.allocf))((vm),(sz))
 #endif
 #ifndef vmresize
-#define vmresize(vm,d,sz,type) (*(_VM_(vm)->meth.resizef))\
-                                       ((vm),(void*)(d),(sz),(type))
+#define vmresize(vm,d,sz)      (*(_VM_(vm)->meth.resizef))\
+                                       ((vm),(void*)(d),(sz))
 #endif
 #ifndef vmfree
 #define vmfree(vm,d)           (*(_VM_(vm)->meth.freef))((vm),(void*)(d))
 #endif
 #define vmaddr(vm,addr)                (*(_VM_(vm)->meth.addrf))((vm),(void*)(addr))
-#define vmoldof(v,p,t,n,x)     (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
-                                       (VM_RSMOVE) )
-#define vmnewof(v,p,t,n,x)     (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
-                                       (VM_RSMOVE|VM_RSCOPY|VM_RSZERO) )
+#define vmoldof(v,p,t,n,x)     (t*)vmresize((v), (p), sizeof(t)*(n)+(x))
+#define vmnewof(v,p,t,n,x)     (t*)vmresize((v), (p), sizeof(t)*(n)+(x))
 #endif                         /* _VMALLOC_H */
 #ifdef __cplusplus
 }
index 0e192d095520db45d1fe130631153954c79758aa..e5c0ea84c4b91e2fd24be44bb60ae5e75d9bee66 100644 (file)
@@ -92,14 +92,10 @@ int bestfree(Vmalloc_t *vm, void *data) {
  * @param vm region allocation from
  * @param data old block of data
  * @param size new size
- * @param type ignored
  */
-void *bestresize(Vmalloc_t *vm, void *data, size_t size, int type) {
+void *bestresize(Vmalloc_t *vm, void *data, size_t size) {
   size_t i;
 
-  /* ignore type */
-  (void)type;
-
   if (!data) {
     return bestalloc(vm, size);
   }
index d6d9a1524e271f086a1ea9f0bfeb0e637fef1064..9f8149a43c0ad2cd8f64c55c6a66c289f121f14d 100644 (file)
@@ -414,7 +414,7 @@ extern "C" {
 
 void *bestalloc(Vmalloc_t * vm, size_t size);
 int bestfree(Vmalloc_t * vm, void * data);
-void *bestresize(Vmalloc_t * vm, void * data, size_t size, int type);
+void *bestresize(Vmalloc_t * vm, void * data, size_t size);
 
 #endif                         /* _VMHDR_H */
 #ifdef __cplusplus