summaryrefslogtreecommitdiff
path: root/src/skaembutils/s6-ln.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-02-10 20:12:16 +0000
committerLaurent Bercot <ska@appnovation.com>2023-02-10 20:12:16 +0000
commit790c8681d3451b61a536871dad234fc294796fd8 (patch)
treea75384fa450410cb339d50439b4c522568138688 /src/skaembutils/s6-ln.c
parentcf07a7b62346c8b5ab8e1c0714590f6566c411fe (diff)
downloads6-portable-utils-790c8681d3451b61a536871dad234fc294796fd8.tar.xz
Clean up all the code
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/skaembutils/s6-ln.c')
-rw-r--r--src/skaembutils/s6-ln.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/skaembutils/s6-ln.c b/src/skaembutils/s6-ln.c
index f4ce8b4..b33562f 100644
--- a/src/skaembutils/s6-ln.c
+++ b/src/skaembutils/s6-ln.c
@@ -42,7 +42,7 @@ static int linkderef (char const *old, char const *new)
#endif
-static int doit (char const *old, char const *new, link_func_ref mylink, int force)
+static int ln_doit (char const *old, char const *new, link_func_ref mylink, int force)
{
if ((*mylink)(old, new) == -1)
{
@@ -123,7 +123,7 @@ int main (int argc, char const *const *argv)
e++ ;
continue ;
}
- e += doit(argv[i], sa.s, mylink, force) ;
+ e += ln_doit(argv[i], sa.s, mylink, force) ;
}
return e ;
}
@@ -133,10 +133,10 @@ int main (int argc, char const *const *argv)
if (nodir ? lstat(argv[1], &st) : stat(argv[1], &st) < 0)
{
if (errno != ENOENT) strerr_diefu2sys(111, "stat ", argv[1]) ;
- return doit(argv[0], argv[1], mylink, force) ;
+ return ln_doit(argv[0], argv[1], mylink, force) ;
}
if (!S_ISDIR(st.st_mode))
- return doit(argv[0], argv[1], mylink, force) ;
+ return ln_doit(argv[0], argv[1], mylink, force) ;
}
{
@@ -146,6 +146,6 @@ int main (int argc, char const *const *argv)
|| !sabasename(&sa, argv[0], strlen(argv[0]))
|| !stralloc_0(&sa))
strerr_diefu1sys(111, "stralloc_catb") ;
- return doit(argv[0], sa.s, mylink, force) ;
+ return ln_doit(argv[0], sa.s, mylink, force) ;
}
}