aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-02-24 08:35:47 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-02-24 08:35:47 +0200
commit1f728fa1ea2ced70254debf3b6bf63b76ad90ee0 (patch)
tree454c79db9ce2a80e652c49487ea9ed1beed86b0c /src
parentaf103177c3a442c86728ccfce2abd7795b6bdc21 (diff)
downloadpies-1f728fa1ea2ced70254debf3b6bf63b76ad90ee0.tar.gz
pies-1f728fa1ea2ced70254debf3b6bf63b76ad90ee0.tar.bz2
Minor stylistic change
Diffstat (limited to 'src')
-rw-r--r--src/pies.c16
-rw-r--r--src/piesctl.c2
-rw-r--r--src/progman.c10
-rw-r--r--src/socket.c4
-rw-r--r--src/sysvinit.c16
5 files changed, 24 insertions, 24 deletions
diff --git a/src/pies.c b/src/pies.c
index c5b3649..21d3421 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -167,13 +167,13 @@ config_file_list_serialize (struct json_value *ar)
json_array_append (ar, obj);
}
}
/* Logging */
static int
-stderr_closed_p ()
+stderr_closed_p (void)
{
int fd = dup (0);
if (fd < 0)
return 1;
close (fd);
return fd <= 2;
@@ -1509,13 +1509,13 @@ struct grecs_keyword pies_keywords[] = {
{ "identity-provider", "name: string", "Configure identity provider",
grecs_type_section, GRECS_INAC | GRECS_HIDDEN },
{NULL}
};
void
-config_init ()
+config_init (void)
{
grecs_include_path_setup (DEFAULT_VERSION_INCLUDE_DIR,
DEFAULT_INCLUDE_DIR, NULL);
grecs_log_to_stderr = log_to_stderr_only;
pies_identity_mechanism_register (&system_identity_mechanism);
#ifdef WITH_PAM
@@ -1549,13 +1549,13 @@ pies_config_parse (char const *name)
return 1;
return 0;
}
void
-config_help ()
+config_help (void)
{
static char docstring[] =
/* TRANSLATORS: do not translate words in quotes */
N_("Configuration file structure for pies.\n"
"For more information, use command \"info pies configuration\".");
grecs_print_docstring (docstring, 0, stdout);
@@ -1804,13 +1804,13 @@ list_components (void)
logmsg (LOG_ERR, "can't run piesctl: %s", strerror (errno));
exit (EX_OSFILE);
}
int
-request_reload ()
+request_reload (void)
{
pid_t pid = pidfile_read (1);
if (pid == -1)
{
logmsg (LOG_CRIT, _("pies is not running"));
@@ -1819,13 +1819,13 @@ request_reload ()
logmsg (LOG_INFO, _("reloading pies at PID %lu"), (unsigned long) pid);
return kill (pid, SIGHUP) ? EX_SOFTWARE : 0;
}
int
-request_status ()
+request_status (void)
{
pid_t pid;
switch (pies_check_status (&pid))
{
case pies_status_ctr:
@@ -1849,13 +1849,13 @@ request_status ()
break;
}
return 0;
}
int
-request_stop ()
+request_stop (void)
{
pid_t pid = pidfile_read (1);
if (pid == -1)
{
logmsg (LOG_CRIT, _("pies is not running"));
@@ -1926,13 +1926,13 @@ remove_pidfile (char *name)
if (unlink (name))
logfuncall ("unlink", name, errno);
}
static void
-set_mailer_argcv ()
+set_mailer_argcv (void)
{
int i;
struct wordsplit ws;
if (wordsplit (mailer_command_line, &ws, WRDSF_DEFFLAGS))
{
@@ -2317,12 +2317,12 @@ main (int argc, char **argv)
logmsg (LOG_INFO, _("%s %s terminated"), proginfo.package, proginfo.version);
exit (EX_OK);
}
void
-xalloc_die ()
+xalloc_die (void)
{
logmsg (LOG_CRIT, _("not enough memory"));
abort ();
}
/* EOF */
diff --git a/src/piesctl.c b/src/piesctl.c
index f4ea514..22a4e27 100644
--- a/src/piesctl.c
+++ b/src/piesctl.c
@@ -126,13 +126,13 @@ struct grecs_keyword piesctl_keywords[] = {
NULL, 0,
callback_instance, NULL, instance_keywords },
{ NULL }
};
static void
-parse_config ()
+parse_config (void)
{
char *file_name;
struct grecs_node *tree;
grecs_include_path_setup (DEFAULT_VERSION_INCLUDE_DIR,
DEFAULT_INCLUDE_DIR, NULL);
diff --git a/src/progman.c b/src/progman.c
index 2d3a14c..852a71c 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -316,13 +316,13 @@ register_command (char *tag, char *command, pid_t pid)
newp->v.c.tag = grecs_strdup (tag);
newp->v.c.command = command;
link_prog (newp, progtail);
}
int
-progman_waiting_p ()
+progman_waiting_p (void)
{
struct prog *prog;
for (prog = proghead; prog; prog = prog->next)
{
if (IS_COMPONENT (prog) && prog->v.p.wait && prog->pid > 0)
@@ -1455,19 +1455,19 @@ prog_create_socket (struct prog *prog, void *data)
}
}
return 0;
}
void
-progman_create_sockets ()
+progman_create_sockets (void)
{
progman_foreach (prog_create_socket, NULL);
}
void
-progman_recompute_alarm ()
+progman_recompute_alarm (void)
{
struct prog *prog;
time_t now = time (NULL);
time_t alarm_time = 0, x;
debug (2, ("Recomputing alarm settings"));
@@ -1495,13 +1495,13 @@ progman_recompute_alarm ()
debug (2, ("alarm=%lu", (unsigned long)alarm_time));
if (alarm_time)
alarm (alarm_time);
}
void
-progman_start ()
+progman_start (void)
{
struct prog *prog;
if (progman_waiting_p ())
/* Noting to do if there are processes left in the previous runlevel */
return;
@@ -2447,13 +2447,13 @@ prog_to_stop (struct prog *prog)
#define DIAG_CON \
(init_process ? (DIAG_TO_STDERR|DIAG_REOPEN_LOG) : diag_output)
/* Stop all program components marked for termination. Wait at most
2*shutdown_timeout seconds. */
void
-progman_gc ()
+progman_gc (void)
{
time_t start;
struct prog *prog, *next;
/* Find first marked prog */
prog = prog_to_stop (proghead);
diff --git a/src/socket.c b/src/socket.c
index 90833e5..2b2bc52 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -416,13 +416,13 @@ find_socket (int fd)
if (sp->fd == fd)
break;
return sp;
}
static void
-calc_fd_max ()
+calc_fd_max (void)
{
struct sockinst *sp;
fd_max = -1;
for (sp = si_head; sp; sp = sp->next)
if (sp->fd > fd_max)
@@ -557,13 +557,13 @@ enable_socket (int fd)
FD_SET (fd, &fdset[PIES_EVT_WR]);
if (sp->handler[PIES_EVT_EX])
FD_SET (fd, &fdset[PIES_EVT_EX]);
}
void
-pies_pause ()
+pies_pause (void)
{
if (fd_max == -1)
calc_fd_max ();
while (1)
{
diff --git a/src/sysvinit.c b/src/sysvinit.c
index 6bc918c..bbd97f3 100644
--- a/src/sysvinit.c
+++ b/src/sysvinit.c
@@ -79,13 +79,13 @@ console_open (int mode)
}
}
return -1;
}
void
-console_stty ()
+console_stty (void)
{
struct termios tty;
int fd;
if ((fd = console_open (O_RDWR|O_NOCTTY)) < 0)
{
@@ -124,13 +124,13 @@ console_stty ()
tcsetattr (fd, TCSANOW, &tty);
tcflush(fd, TCIOFLUSH);
close (fd);
}
int
-askrunlevel ()
+askrunlevel (void)
{
int fd;
char c, lvl = -1;
enum { srl_init, srl_char, srl_r, srl_n, srl_skip } srl = srl_init;
static const char prompt[] = "\nEnter runlevel: ";
@@ -191,13 +191,13 @@ askrunlevel ()
}
close (fd);
return toupper (lvl);
}
static int
-getinitdefault ()
+getinitdefault (void)
{
return initdefault ? initdefault : askrunlevel ();
}
static int
runlevel_index (int n)
@@ -359,13 +359,13 @@ char *sysvinit_environ_hint[NR_ENVHINT] = {
#define ENVI_CONSOLE 2
#define ENVI_VERSION 3
#define ENVI_PATH 4
#define ENVI_AVAIL 5
static void
-envsetup ()
+envsetup (void)
{
int i;
for (i = 0; i < ENVI_AVAIL; i++)
{
char *str = sysvinit_environ_hint[i];
@@ -537,13 +537,13 @@ sysvinit_fifo_handler (int fd, void *data)
size = 0;
}
return 0;
}
static void
-create_fifo ()
+create_fifo (void)
{
static int fd = -1;
struct stat st, fst;
if (stat (init_fifo, &st) < 0)
{
@@ -594,13 +594,13 @@ create_fifo ()
}
static char *try_console[] = { NULL, "/dev/console", "/dev/tty0" };
char *console_device;
static void
-set_console_dev ()
+set_console_dev (void)
{
int i;
for (i = 0; i < ARRAY_SIZE (try_console); i++)
{
if (try_console[i])
{
@@ -733,13 +733,13 @@ sysvinit_realloc (void *ptr, size_t size)
unintr_sleep (5);
}
return p;
}
void
-sysvinit_begin ()
+sysvinit_begin (void)
{
int sigv[] = {
SIGINT,
SIGPWR,
SIGWINCH,
};
@@ -764,13 +764,13 @@ sysvinit_begin ()
#define IS_RUNNING_DISABLED_PROG(prog) \
(IS_COMPONENT (prog) \
&& prog->v.p.status == status_running \
&& !prog->v.p.active)
int
-inittrans ()
+inittrans (void)
{
int n;
int newlevel = 0;
enum boot_state newstate;
int trans = 0;

Return to:

Send suggestions and report system problems to the System administrator.