From 973ae30e7c4f7a1afb385dd3d8eeea178f981445 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Mon, 8 Jul 2024 13:24:39 +0200 Subject: fix deprecated prototypes --- src/instcheck.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/instcheck.c') 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); -- cgit v1.2.3