summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2023-03-19 07:38:24 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2023-03-19 07:38:24 +0100
commiteb9fcece9e622712a60ad306ae83f4ac4a2a3571 (patch)
tree6d03dc447a532d70f3afa8bb59957f87bed3d577
parent011dfc839d40c735fb63474aa6d5e1412b823a3b (diff)
downloadroux-eb9fcece9e622712a60ad306ae83f4ac4a2a3571.tar.gz
naming nit
-rw-r--r--all.h2
-rw-r--r--amd64/sysv.c2
-rw-r--r--arm64/abi.c2
-rw-r--r--rega.c2
-rw-r--r--util.c6
5 files changed, 7 insertions, 7 deletions
diff --git a/all.h b/all.h
index 850803b..39fda2a 100644
--- a/all.h
+++ b/all.h
@@ -458,7 +458,7 @@ void freeall(void);
 void *vnew(ulong, size_t, Pool);
 void vfree(void *);
 void vgrow(void *, ulong);
-void fmt(char *, char *, ...);
+void strf(char[NString], char *, ...);
 uint32_t intern(char *);
 char *str(uint32_t);
 int argcls(Ins *, int);
diff --git a/amd64/sysv.c b/amd64/sysv.c
index 6c62887..48ac0a5 100644
--- a/amd64/sysv.c
+++ b/amd64/sysv.c
@@ -512,7 +512,7 @@ split(Fn *fn, Blk *b)
 	idup(&bn->ins, curi, bn->nins);
 	curi = &insb[NIns];
 	bn->visit = ++b->visit;
-	fmt(bn->name, "%s.%d", b->name, b->visit);
+	strf(bn->name, "%s.%d", b->name, b->visit);
 	bn->loop = b->loop;
 	bn->link = b->link;
 	b->link = bn;
diff --git a/arm64/abi.c b/arm64/abi.c
index 18bdfc5..9a29e3f 100644
--- a/arm64/abi.c
+++ b/arm64/abi.c
@@ -547,7 +547,7 @@ split(Fn *fn, Blk *b)
 	idup(&bn->ins, curi, bn->nins);
 	curi = &insb[NIns];
 	bn->visit = ++b->visit;
-	fmt(bn->name, "%s.%d", b->name, b->visit);
+	strf(bn->name, "%s.%d", b->name, b->visit);
 	bn->loop = b->loop;
 	bn->link = b->link;
 	b->link = bn;
diff --git a/rega.c b/rega.c
index d7452a8..7af7fae 100644
--- a/rega.c
+++ b/rega.c
@@ -670,7 +670,7 @@ rega(Fn *fn)
 			b1->link = blist;
 			blist = b1;
 			fn->nblk++;
-			fmt(b1->name, "%s_%s", b->name, s->name);
+			strf(b1->name, "%s_%s", b->name, s->name);
 			b1->nins = &insb[NIns] - curi;
 			stmov += b1->nins;
 			stblk += 1;
diff --git a/util.c b/util.c
index 2ab82bb..362fa98 100644
--- a/util.c
+++ b/util.c
@@ -155,12 +155,12 @@ vgrow(void *vp, ulong len)
 }
 
 void
-fmt(char *dst, char *s, ...)
+strf(char str[NString], char *s, ...)
 {
 	va_list ap;
 
 	va_start(ap, s);
-	vsnprintf(dst, NString, s, ap);
+	vsnprintf(str, NString, s, ap);
 	va_end(ap);
 }
 
@@ -344,7 +344,7 @@ newtmp(char *prfx, int k,  Fn *fn)
 	vgrow(&fn->tmp, fn->ntmp);
 	memset(&fn->tmp[t], 0, sizeof(Tmp));
 	if (prfx)
-		sprintf(fn->tmp[t].name, "%s.%d", prfx, ++n);
+		strf(fn->tmp[t].name, "%s.%d", prfx, ++n);
 	fn->tmp[t].cls = k;
 	fn->tmp[t].slot = -1;
 	fn->tmp[t].nuse = +1;