summaryrefslogtreecommitdiff
path: root/src/qmail-qmaint.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/qmail-qmaint.c
parent66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff)
fix deprecated prototypes
Diffstat (limited to 'src/qmail-qmaint.c')
-rw-r--r--src/qmail-qmaint.c53
1 files changed, 27 insertions, 26 deletions
diff --git a/src/qmail-qmaint.c b/src/qmail-qmaint.c
index c0dac40..2c6e23a 100644
--- a/src/qmail-qmaint.c
+++ b/src/qmail-qmaint.c
@@ -57,22 +57,22 @@ int qmailr_uid;
int qmail_gid;
int split_num;
-void die_make(char *name)
+static void die_make(char *name)
{
logmsg(WHO, 111, ERROR, B("Failed to make: ", name));
}
-void die_user(char *user)
+static void die_user(char *user)
{
logmsg(WHO, 111, ERROR, B("Failed to determine uid of: ", user));
}
-void die_group(char *group)
+static void die_group(char *group)
{
logmsg(WHO, 111, ERROR, B("Failed to determine gid of: ", group));
}
-void die_check()
+static void die_check()
{
logmsg(
WHO,
@@ -82,7 +82,7 @@ void die_check()
"permission to access it.");
}
-void die_recon()
+static void die_recon()
{
logmsg(
WHO,
@@ -91,14 +91,14 @@ void die_recon()
"Failed to reconstruct queue. \nEnsure the queue exists and you have permission to modify it.");
}
-void die_nomem()
+static void die_nomem()
{
logmsg(WHO, 110, ERROR, "Out of memory.");
}
/*returns 1==yes, 0==no*/
-int confirm()
+static int confirm()
{
int match;
@@ -122,7 +122,7 @@ int confirm()
logmsg(WHO, 0, WARN, B("It looks like ownerships are wrong for ", name, " should I fix them? (Y/n)"))
#define COWNER logmsg(WHO, 0, WARN, B("Changing ownership: ", name, " => ", unum, "/", gnum))
-int check_item(char *name, int uid, int gid, int perm, char type, int size)
+static int check_item(char *name, int uid, int gid, int perm, char type, int size)
{
struct stat st;
int fd;
@@ -290,7 +290,7 @@ int check_item(char *name, int uid, int gid, int perm, char type, int size)
return 0;
}
-int check_files(char *directory, int uid, int gid, int perm)
+static int check_files(char *directory, int uid, int gid, int perm)
{
DIR *dir;
direntry *d;
@@ -313,7 +313,7 @@ int check_files(char *directory, int uid, int gid, int perm)
return 0;
}
-void warn_files(char *directory)
+static void warn_files(char *directory)
{
DIR *dir;
direntry *d;
@@ -340,7 +340,8 @@ void warn_files(char *directory)
" that shouldn't be there. I will not remove them. You should consider checking it out."));
}
-int check_splits(char *directory, int dir_uid, int dir_gid, int dir_perm, int file_gid, int file_perm)
+static int check_splits(
+ char *directory, int dir_uid, int dir_gid, int dir_perm, int file_gid, int file_perm)
{
DIR *dir;
direntry *d;
@@ -376,7 +377,7 @@ int check_splits(char *directory, int dir_uid, int dir_gid, int dir_perm, int fi
return 0;
}
-int rename_mess(char *dir, char *part, char *new_part, char *old_filename, char *new_filename)
+static int rename_mess(char *dir, char *part, char *new_part, char *old_filename, char *new_filename)
{
if (flag_interactive && !flag_namefix) {
@@ -409,7 +410,7 @@ int rename_mess(char *dir, char *part, char *new_part, char *old_filename, char
return 0;
}
-int fix_part(char *part)
+static int fix_part(char *part)
{
DIR *dir;
direntry *d;
@@ -486,7 +487,7 @@ int fix_part(char *part)
return 0;
}
-int fix_names()
+static int fix_names()
{
int i;
@@ -502,7 +503,7 @@ int fix_names()
return 0;
}
-int check_dirs()
+static int check_dirs()
{
/*check root existence*/
if (!stralloc_copy(&check_dir, &queue_dir)) die_nomem();
@@ -594,61 +595,61 @@ int check_dirs()
stralloc fn = {0};
-void fnmake_init()
+static void fnmake_init()
{
while (!stralloc_ready(&fn, FMTQFN)) die_nomem();
}
-void fnmake_local(unsigned long id)
+static void fnmake_local(unsigned long id)
{
fn.len = fmtqfn(fn.s, "local/", id, 1);
}
-void fnmake_remote(unsigned long id)
+static void fnmake_remote(unsigned long id)
{
fn.len = fmtqfn(fn.s, "remote/", id, 1);
}
-void fnmake_mess(unsigned long id)
+static void fnmake_mess(unsigned long id)
{
fn.len = fmtqfn(fn.s, "mess/", id, 1);
}
-void fnmake_dkim(unsigned long id)
+static void fnmake_dkim(unsigned long id)
{
fn.len = fmtqfn(fn.s, "dkim/", id, 1);
}
-void fnmake_info(unsigned long id)
+static void fnmake_info(unsigned long id)
{
fn.len = fmtqfn(fn.s, "info/", id, 1);
}
-void fnmake_bounce(unsigned long id)
+static void fnmake_bounce(unsigned long id)
{
fn.len = fmtqfn(fn.s, "bounce/", id, 0);
}
-void warn_unlink(unsigned long id)
+static void warn_unlink(unsigned long id)
{
char foo[FMT_ULONG];
foo[fmt_ulong(foo, id)] = 0;
logmsg(WHO, 99, WARN, B("no such file to unlink #", foo));
}
-void err_unlink(unsigned long id)
+static void err_unlink(unsigned long id)
{
char foo[FMT_ULONG];
foo[fmt_ulong(foo, id)] = 0;
logmsg(WHO, 100, ERROR, B("trouble with unlinking #", foo));
}
-void err_chdir()
+static void err_chdir()
{
logmsg(WHO, 110, FATAL, "unable to chdir");
}
-int delete_msg(unsigned long id)
+static int delete_msg(unsigned long id)
{
struct stat st;
int bounce = 1;