aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2025-11-29 06:41:28 -0700
committerRandy Palamar <randy@rnpnr.xyz>2025-12-16 11:28:44 -0700
commita98a1850640ca709ed68df3ca57f0404bbc4d3fc (patch)
tree430b52ed83df3df7ffed55cf71fe59e0a159ebe3 /map.c
parent4f6ecc5d11a9a3f3e628080db6f03e8dd4ef3e9d (diff)
downloadvis-a98a1850640ca709ed68df3ca57f0404bbc4d3fc.tar.gz
vis-a98a1850640ca709ed68df3ca57f0404bbc4d3fc.tar.xz
clean up remaining struct and function name collisions
I think that having structs with the same name be completely different depending on which part of the program you look at is even less readable than having functions with same name.
Diffstat (limited to 'map.c')
-rw-r--r--map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/map.c b/map.c
index 6ec02d6..d8568ea 100644
--- a/map.c
+++ b/map.c
@@ -273,11 +273,11 @@ const Map *map_prefix(const Map *map, const char *prefix)
return top;
}
-static void clear(Map n)
+static void map_clear_impl(Map n)
{
if (!n.v) {
- clear(n.u.n->child[0]);
- clear(n.u.n->child[1]);
+ map_clear_impl(n.u.n->child[0]);
+ map_clear_impl(n.u.n->child[1]);
free(n.u.n);
} else {
free((char*)n.u.s);
@@ -287,7 +287,7 @@ static void clear(Map n)
void map_clear(Map *map)
{
if (map->u.n)
- clear(*map);
+ map_clear_impl(*map);
map->u.n = NULL;
map->v = NULL;
}