diff options
Diffstat (limited to 'usr.bin/top')
-rw-r--r-- | usr.bin/top/machine.c | 4 | ||||
-rw-r--r-- | usr.bin/top/machine.h | 4 | ||||
-rw-r--r-- | usr.bin/top/top.c | 4 | ||||
-rw-r--r-- | usr.bin/top/top.h | 4 | ||||
-rw-r--r-- | usr.bin/top/username.c | 4 | ||||
-rw-r--r-- | usr.bin/top/utils.c | 4 | ||||
-rw-r--r-- | usr.bin/top/utils.h | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 4643778a15c..2926ec2133b 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machine.c,v 1.90 2018/05/14 12:31:21 mpi Exp $ */ +/* $OpenBSD: machine.c,v 1.91 2018/09/13 15:23:32 millert Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert <tholo@sigmasoft.com> @@ -545,7 +545,7 @@ format_comm(struct kinfo_proc *kp) } char * -format_next_process(caddr_t hndl, char *(*get_userid)(uid_t), pid_t *pid, +format_next_process(caddr_t hndl, const char *(*get_userid)(uid_t), pid_t *pid, int show_threads) { char *p_wait; diff --git a/usr.bin/top/machine.h b/usr.bin/top/machine.h index eeb10deeee5..4c7c62b78dc 100644 --- a/usr.bin/top/machine.h +++ b/usr.bin/top/machine.h @@ -1,4 +1,4 @@ -/* $OpenBSD: machine.h,v 1.20 2015/05/06 07:53:29 mpi Exp $ */ +/* $OpenBSD: machine.h,v 1.21 2018/09/13 15:23:32 millert Exp $ */ /* * Top users/processes display for Unix @@ -89,7 +89,7 @@ extern void get_system_info(struct system_info *); extern caddr_t get_process_info(struct system_info *, struct process_select *, int (*) (const void *, const void *)); -extern char *format_next_process(caddr_t, char *(*)(uid_t), pid_t *, int); +extern char *format_next_process(caddr_t, const char *(*)(uid_t), pid_t *, int); extern uid_t proc_owner(pid_t); extern struct kinfo_proc *getprocs(int, int, int *); diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index d3ed70e65f1..178696ba792 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -1,4 +1,4 @@ -/* $OpenBSD: top.c,v 1.90 2018/07/29 13:34:26 deraadt Exp $ */ +/* $OpenBSD: top.c,v 1.91 2018/09/13 15:23:32 millert Exp $ */ /* * Top users/processes display for Unix @@ -279,7 +279,7 @@ int main(int argc, char *argv[]) { char *uname_field = "USERNAME", *header_text, *env_top; - char *(*get_userid)(uid_t) = username; + const char *(*get_userid)(uid_t) = username; char **preset_argv = NULL, **av = argv; int preset_argc = 0, ac = argc, active_procs, i; sigset_t mask, oldmask; diff --git a/usr.bin/top/top.h b/usr.bin/top/top.h index 16dfb7ae6ab..e54474f4cdb 100644 --- a/usr.bin/top/top.h +++ b/usr.bin/top/top.h @@ -1,4 +1,4 @@ -/* $OpenBSD: top.h,v 1.15 2013/09/21 14:15:19 espie Exp $ */ +/* $OpenBSD: top.h,v 1.16 2018/09/13 15:23:32 millert Exp $ */ /* * Top users/processes display for Unix @@ -78,5 +78,5 @@ extern char *renice_procs(char *); extern void quit(int); /* username.c */ -extern char *username(uid_t); +extern const char *username(uid_t); extern uid_t userid(char *); diff --git a/usr.bin/top/username.c b/usr.bin/top/username.c index b53e1c1a0b9..21d8d396efa 100644 --- a/usr.bin/top/username.c +++ b/usr.bin/top/username.c @@ -1,4 +1,4 @@ -/* $OpenBSD: username.c,v 1.17 2015/10/26 13:56:18 tedu Exp $ */ +/* $OpenBSD: username.c,v 1.18 2018/09/13 15:23:32 millert Exp $ */ /* * Top users/processes display for Unix @@ -41,7 +41,7 @@ #include "top.h" #include "utils.h" -char * +const char * username(uid_t uid) { return user_from_uid(uid, 0); diff --git a/usr.bin/top/utils.c b/usr.bin/top/utils.c index cb21df164b5..9e7f9cce41b 100644 --- a/usr.bin/top/utils.c +++ b/usr.bin/top/utils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utils.c,v 1.26 2017/03/15 04:24:14 deraadt Exp $ */ +/* $OpenBSD: utils.c,v 1.27 2018/09/13 15:23:32 millert Exp $ */ /* * Top users/processes display for Unix @@ -88,7 +88,7 @@ itoa(int val) * format_uid(uid) - like itoa, except for uid_t and the number is right * justified in a 6 character field to match uname_field in top.c. */ -char * +const char * format_uid(uid_t uid) { static char buffer[16]; /* result is built here */ diff --git a/usr.bin/top/utils.h b/usr.bin/top/utils.h index e38e4b2f593..034d2f62c60 100644 --- a/usr.bin/top/utils.h +++ b/usr.bin/top/utils.h @@ -1,4 +1,4 @@ -/* $OpenBSD: utils.h,v 1.8 2005/06/08 22:36:43 millert Exp $ */ +/* $OpenBSD: utils.h,v 1.9 2018/09/13 15:23:32 millert Exp $ */ /* * Top users/processes display for Unix @@ -32,7 +32,7 @@ int atoiwi(char *); char *itoa(int); -char *format_uid(uid_t); +const char *format_uid(uid_t); int digits(int); int string_index(char *, char **); char **argparse(char *, int *); |