commit a41404c584fb9c7f6a8d0980fac2dd6016ccf2cc
parent 5806288c361b44e976e7db89a79c11efd7af068a
Author: Rolf Eike Beer <eike@sf-mail.de>
Date: Fri, 8 May 2020 20:46:23 +0200
genalloc: do not rename parameter names
The names of the function parameters as well as the name of the local variable
were taken from the macro arguments. Noone passed anything different than the
default names there, and doing so doesn't make any sense anyway.
Diffstat:
8 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/gen_allocdefs.h b/gen_allocdefs.h
@@ -1,7 +1,7 @@
#ifndef GEN_ALLOC_DEFS_H
#define GEN_ALLOC_DEFS_H
-#define GEN_ALLOC_readyplus(ta,type,field,len,a,i,n,x,base,ta_rplus) \
+#define GEN_ALLOC_readyplus(ta,type,field,len,a,base,ta_rplus) \
static int ta_rplus ## _internal (ta *x, unsigned int n, unsigned int pluslen) \
{ register unsigned int i; \
if (x->field) { \
@@ -18,11 +18,11 @@ int ta_rplus(ta *x, unsigned int n) \
/* this needs a GEN_ALLOC_readyplus call before as it reuses the internal helper
* function. */
-#define GEN_ALLOC_ready(ta,type,field,len,a,i,n,x,base,ta_ready) \
+#define GEN_ALLOC_ready(ta,type,field,len,a,base,ta_ready) \
int ta_ready(ta *x, unsigned int n) \
{ return ta_ready ## plus_internal (x, n, 0); }
-#define GEN_ALLOC_append(ta,type,field,len,a,i,n,x,base,ta_rplus,ta_append) \
+#define GEN_ALLOC_append(ta,type,field,len,a,base,ta_rplus,ta_append) \
int ta_append(ta *x, type *i) \
{ if (!ta_rplus(x,1)) return 0; x->field[x->len++] = *i; return 1; }
diff --git a/ipalloc.c b/ipalloc.c
@@ -3,5 +3,5 @@
#include "ip.h"
#include "ipalloc.h"
-GEN_ALLOC_readyplus(ipalloc,struct ip_mx,ix,len,a,i,n,x,10,ipalloc_readyplus)
-GEN_ALLOC_append(ipalloc,struct ip_mx,ix,len,a,i,n,x,10,ipalloc_readyplus,ipalloc_append)
+GEN_ALLOC_readyplus(ipalloc,struct ip_mx,ix,len,a,10,ipalloc_readyplus)
+GEN_ALLOC_append(ipalloc,struct ip_mx,ix,len,a,10,ipalloc_readyplus,ipalloc_append)
diff --git a/prioq.c b/prioq.c
@@ -2,7 +2,7 @@
#include "gen_allocdefs.h"
#include "prioq.h"
-GEN_ALLOC_readyplus(prioq,struct prioq_elt,p,len,a,i,n,x,100,prioq_readyplus)
+GEN_ALLOC_readyplus(prioq,struct prioq_elt,p,len,a,100,prioq_readyplus)
int prioq_insert(pq,pe)
prioq *pq;
diff --git a/qmail-inject.c b/qmail-inject.c
@@ -77,7 +77,7 @@ void doordie(sa,r) stralloc *sa; int r; {
substdio_putflush(subfderr,sa->s,sa->len); perm(); }
GEN_ALLOC_typedef(saa,stralloc,sa,len,a)
-GEN_ALLOC_readyplus(saa,stralloc,sa,len,a,i,n,x,10,saa_readyplus)
+GEN_ALLOC_readyplus(saa,stralloc,sa,len,a,10,saa_readyplus)
static stralloc sauninit = {0};
diff --git a/qmail-remote.c b/qmail-remote.c
@@ -35,7 +35,7 @@
unsigned long port = PORT_SMTP;
GEN_ALLOC_typedef(saa,stralloc,sa,len,a)
-GEN_ALLOC_readyplus(saa,stralloc,sa,len,a,i,n,x,10,saa_readyplus)
+GEN_ALLOC_readyplus(saa,stralloc,sa,len,a,10,saa_readyplus)
static stralloc sauninit = {0};
stralloc helohost = {0};
diff --git a/stralloc_eady.c b/stralloc_eady.c
@@ -2,5 +2,5 @@
#include "stralloc.h"
#include "gen_allocdefs.h"
-GEN_ALLOC_readyplus(stralloc,char,s,len,a,i,n,x,30,stralloc_readyplus)
-GEN_ALLOC_ready(stralloc,char,s,len,a,i,n,x,30,stralloc_ready)
+GEN_ALLOC_readyplus(stralloc,char,s,len,a,30,stralloc_readyplus)
+GEN_ALLOC_ready(stralloc,char,s,len,a,30,stralloc_ready)
diff --git a/stralloc_pend.c b/stralloc_pend.c
@@ -2,4 +2,4 @@
#include "stralloc.h"
#include "gen_allocdefs.h"
-GEN_ALLOC_append(stralloc,char,s,len,a,i,n,x,30,stralloc_readyplus,stralloc_append)
+GEN_ALLOC_append(stralloc,char,s,len,a,30,stralloc_readyplus,stralloc_append)
diff --git a/token822.c b/token822.c
@@ -22,9 +22,9 @@ token822_alloc *ta;
}
}
-GEN_ALLOC_readyplus(token822_alloc,struct token822,t,len,a,i,n,x,30,token822_readyplus)
-GEN_ALLOC_ready(token822_alloc,struct token822,t,len,a,i,n,x,30,token822_ready)
-GEN_ALLOC_append(token822_alloc,struct token822,t,len,a,i,n,x,30,token822_readyplus,token822_append)
+GEN_ALLOC_readyplus(token822_alloc,struct token822,t,len,a,30,token822_readyplus)
+GEN_ALLOC_ready(token822_alloc,struct token822,t,len,a,30,token822_ready)
+GEN_ALLOC_append(token822_alloc,struct token822,t,len,a,30,token822_readyplus,token822_append)
static int needspace(t1,t2)
int t1;