aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-12-28 18:12:37 -0500
committerMike Frysinger <vapier@gentoo.org>2016-12-28 18:12:37 -0500
commit572b19d78b29f82554fc31fe814de29742f0874c (patch)
treec406173a2c025b53f702e9b86ff7812f9c6a1c46 /libq/xmkdir.c
parentlibq: drop unused xgetcwd/xreadlink helpers (diff)
downloadportage-utils-572b19d78b29f82554fc31fe814de29742f0874c.tar.gz
portage-utils-572b19d78b29f82554fc31fe814de29742f0874c.tar.bz2
portage-utils-572b19d78b29f82554fc31fe814de29742f0874c.zip
drop _q_static and standardize func prototypes a bit
Diffstat (limited to 'libq/xmkdir.c')
-rw-r--r--libq/xmkdir.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libq/xmkdir.c b/libq/xmkdir.c
index b47d44c..265cb5b 100644
--- a/libq/xmkdir.c
+++ b/libq/xmkdir.c
@@ -1,5 +1,6 @@
/* Emulate `mkdir -p -m MODE PATH` */
-static int mkdir_p_at(int dfd, const char *path, mode_t mode)
+static int
+mkdir_p_at(int dfd, const char *path, mode_t mode)
{
char *_p, *p, *s;
@@ -35,13 +36,15 @@ static int mkdir_p_at(int dfd, const char *path, mode_t mode)
return 0;
}
-static int mkdir_p(const char *path, mode_t mode)
+static int
+mkdir_p(const char *path, mode_t mode)
{
return mkdir_p_at(AT_FDCWD, path, mode);
}
/* Emulate `rm -rf PATH` */
-_q_static int rm_rf_at(int dfd, const char *path)
+static int
+rm_rf_at(int dfd, const char *path)
{
int subdfd;
DIR *dir;
@@ -75,7 +78,8 @@ _q_static int rm_rf_at(int dfd, const char *path)
return 0;
}
-_q_static int rm_rf(const char *path)
+static int
+rm_rf(const char *path)
{
rm_rf_at(AT_FDCWD, path);
@@ -91,7 +95,8 @@ _q_static int rm_rf(const char *path)
return -1;
}
-_q_static int rmdir_r_at(int dfd, const char *path)
+static int
+rmdir_r_at(int dfd, const char *path)
{
size_t len;
char *p, *e;
@@ -113,7 +118,8 @@ _q_static int rmdir_r_at(int dfd, const char *path)
}
/*
-_q_static int rmdir_r(const char *path)
+static int
+rmdir_r(const char *path)
{
return rmdir_r_at(AT_FDCWD, path);
}