summaryrefslogtreecommitdiff
path: root/libps
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-03-18 23:18:11 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-04-03 00:22:08 +0200
commit0209b2c932994e9ca55d39d98a83ea02aacd1332 (patch)
treef8778cca656943ee36193b49a7727557ba82319b /libps
parent6f3d68bc8b46bdc7b0f5f43918744d99746672a2 (diff)
Modernize code by removing use of old style definitions.
Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
Diffstat (limited to 'libps')
-rw-r--r--libps/host.c2
-rw-r--r--libps/procstat.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/libps/host.c b/libps/host.c
index 120e5c49..3ef83cae 100644
--- a/libps/host.c
+++ b/libps/host.c
@@ -38,7 +38,7 @@
/* Return the current host port. */
mach_port_t
-ps_get_host ()
+ps_get_host (void)
{
static mach_port_t host = MACH_PORT_NULL;
if (host == MACH_PORT_NULL)
diff --git a/libps/procstat.c b/libps/procstat.c
index 131d3a4b..45ae562f 100644
--- a/libps/procstat.c
+++ b/libps/procstat.c
@@ -758,7 +758,7 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
/* Turn off use of the msg port if we decide somewhere along the way that
it's hosed. */
- void suppress_msgport ()
+ void suppress_msgport (void)
{
/* Turn off those things that were only good given the msg port. */
need &= ~(flags & ~no_msgport_flags);
@@ -1057,8 +1057,7 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
/* ---------------------------------------------------------------- */
/* Discard PS and any resources it holds. */
void
-_proc_stat_free (ps)
- struct proc_stat *ps;
+_proc_stat_free (struct proc_stat *ps)
{
if (ps->context->user_hooks && ps->context->user_hooks->cleanup)
/* Free any user state. */