projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sparse fixup: warning: non-ANSI function declaration of function '...'
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
c4750da
..
17d5008
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-1,7
+1,7
@@
/*
tincd.c -- the main file for tincd
Copyright (C) 1998-2005 Ivo Timmermans
/*
tincd.c -- the main file for tincd
Copyright (C) 1998-2005 Ivo Timmermans
- 2000-201
0
Guus Sliepen <guus@tinc-vpn.org>
+ 2000-201
1
Guus Sliepen <guus@tinc-vpn.org>
2008 Max Rijevski <maksuf@gmail.com>
2009 Michael Tokarev <mjt@tls.msk.ru>
2010 Julien Muchembled <jm@jmuchemb.eu>
2008 Max Rijevski <maksuf@gmail.com>
2009 Michael Tokarev <mjt@tls.msk.ru>
2010 Julien Muchembled <jm@jmuchemb.eu>
@@
-64,19
+64,19
@@
#include "xalloc.h"
/* The name this program was run with. */
#include "xalloc.h"
/* The name this program was run with. */
-char *program_name = NULL;
+
static
char *program_name = NULL;
/* If nonzero, display usage information and exit. */
/* If nonzero, display usage information and exit. */
-bool show_help = false;
+
static
bool show_help = false;
/* If nonzero, print the version on standard output and exit. */
/* If nonzero, print the version on standard output and exit. */
-bool show_version = false;
+
static
bool show_version = false;
/* If nonzero, use null ciphers and skip all key exchanges. */
bool bypass_security = false;
/* If nonzero, disable swapping for this process. */
/* If nonzero, use null ciphers and skip all key exchanges. */
bool bypass_security = false;
/* If nonzero, disable swapping for this process. */
-bool do_mlock = false;
+
static
bool do_mlock = false;
/* If nonzero, chroot to netdir after startup. */
static bool do_chroot = false;
/* If nonzero, chroot to netdir after startup. */
static bool do_chroot = false;
@@
-282,7
+282,7
@@
static void make_names(void) {
}
}
}
}
-static void free_names() {
+static void free_names(
void
) {
if (identname) free(identname);
if (netname) free(netname);
if (controlcookiename) free(controlcookiename);
if (identname) free(identname);
if (netname) free(netname);
if (controlcookiename) free(controlcookiename);
@@
-290,7
+290,7
@@
static void free_names() {
if (confbase) free(confbase);
}
if (confbase) free(confbase);
}
-static bool drop_privs() {
+static bool drop_privs(
void
) {
#ifdef HAVE_MINGW
if (switchuser) {
logger(LOG_ERR, "%s not supported on this platform", "-U");
#ifdef HAVE_MINGW
if (switchuser) {
logger(LOG_ERR, "%s not supported on this platform", "-U");
@@
-339,12
+339,12
@@
static bool drop_privs() {
}
#ifdef HAVE_MINGW
}
#ifdef HAVE_MINGW
-# define setpriority(level) SetPriorityClass(GetCurrentProcess(),
level
)
+# define setpriority(level) SetPriorityClass(GetCurrentProcess(),
(level)
)
#else
# define NORMAL_PRIORITY_CLASS 0
# define BELOW_NORMAL_PRIORITY_CLASS 10
# define HIGH_PRIORITY_CLASS -10
#else
# define NORMAL_PRIORITY_CLASS 0
# define BELOW_NORMAL_PRIORITY_CLASS 10
# define HIGH_PRIORITY_CLASS -10
-# define setpriority(level)
nice(level
)
+# define setpriority(level)
(setpriority(PRIO_PROCESS, 0, (level))
)
#endif
int main(int argc, char **argv) {
#endif
int main(int argc, char **argv) {
@@
-358,7
+358,7
@@
int main(int argc, char **argv) {
if(show_version) {
printf("%s version %s (built %s %s, protocol %d)\n", PACKAGE,
VERSION, __DATE__, __TIME__, PROT_CURRENT);
if(show_version) {
printf("%s version %s (built %s %s, protocol %d)\n", PACKAGE,
VERSION, __DATE__, __TIME__, PROT_CURRENT);
- printf("Copyright (C) 1998-201
0
Ivo Timmermans, Guus Sliepen and others.\n"
+ printf("Copyright (C) 1998-201
1
Ivo Timmermans, Guus Sliepen and others.\n"
"See the AUTHORS file for a complete list.\n\n"
"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
"and you are welcome to redistribute it under certain conditions;\n"
"See the AUTHORS file for a complete list.\n\n"
"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
"and you are welcome to redistribute it under certain conditions;\n"