summaryrefslogtreecommitdiff
path: root/src/instcheck.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
commit973ae30e7c4f7a1afb385dd3d8eeea178f981445 (patch)
tree1a5d8be5b3ff273a141b6144bf3031b1bc3deb2d /src/instcheck.c
parent66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff)
fix deprecated prototypes
Diffstat (limited to 'src/instcheck.c')
-rw-r--r--src/instcheck.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/instcheck.c b/src/instcheck.c
index 126ad11..c42eebf 100644
--- a/src/instcheck.c
+++ b/src/instcheck.c
@@ -7,11 +7,10 @@
#include "hier.h"
-extern void hier();
-
#define WHO "instcheck"
-void perm(char *prefix1, char *prefix2, char *prefix3, char *file, int type, int uid, int gid, int mode)
+static void perm(
+ char *prefix1, char *prefix2, char *prefix3, char *file, int type, int uid, int gid, int mode)
{
struct stat st;
@@ -33,31 +32,31 @@ void perm(char *prefix1, char *prefix2, char *prefix3, char *file, int type, int
logmsg(WHO, 0, WARN, B("file has wrong type: ", prefix1, prefix2, prefix3, file));
}
-void h(char *home, int uid, int gid, int mode)
+void h(const char *home, int uid, int gid, int mode)
{
perm("", "", "", home, S_IFDIR, uid, gid, mode);
}
-void d(char *home, char *subdir, int uid, int gid, int mode)
+void d(const char *home, char *subdir, int uid, int gid, int mode)
{
if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home));
perm("", home, "/", subdir, S_IFDIR, uid, gid, mode);
}
-void p(char *home, char *fifo, int uid, int gid, int mode)
+void p(const char *home, char *fifo, int uid, int gid, int mode)
{
if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home));
perm("", home, "/", fifo, S_IFIFO, uid, gid, mode);
}
-void c(char *home, char *subdir, char *file, int uid, int gid, int mode)
+void c(const char *home, char *subdir, char *file, int uid, int gid, int mode)
{
if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home));
if (chdir(subdir) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home, "/", subdir));
perm(".../", subdir, "/", file, S_IFREG, uid, gid, mode);
}
-void z(char *home, char *file, int len, int uid, int gid, int mode)
+void z(const char *home, char *file, int len, int uid, int gid, int mode)
{
if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home));
perm("", home, "/", file, S_IFREG, uid, gid, mode);