diff options
author | 2020-12-04 02:25:13 +0000 | |
---|---|---|
committer | 2020-12-04 02:25:13 +0000 | |
commit | b25a20403477736b71fe89ab560c150edbae896f (patch) | |
tree | ff2716c29669240250e943e39451d6294f35a0ea | |
parent | cat(1): simplify argv processing loops (diff) | |
download | wireguard-openbsd-b25a20403477736b71fe89ab560c150edbae896f.tar.xz wireguard-openbsd-b25a20403477736b71fe89ab560c150edbae896f.zip |
make program name be const
-rw-r--r-- | usr.bin/ssh/log.c | 7 | ||||
-rw-r--r-- | usr.bin/ssh/log.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/ssh/log.c b/usr.bin/ssh/log.c index b33d4a6a952..23042483114 100644 --- a/usr.bin/ssh/log.c +++ b/usr.bin/ssh/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.55 2020/10/18 11:21:59 djm Exp $ */ +/* $OpenBSD: log.c,v 1.56 2020/12/04 02:25:13 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -53,7 +53,7 @@ static LogLevel log_level = SYSLOG_LEVEL_INFO; static int log_on_stderr = 1; static int log_stderr_fd = STDERR_FILENO; static int log_facility = LOG_AUTH; -static char *argv0; +static const char *argv0; static log_handler_fn *log_handler; static void *log_handler_ctx; static char **log_verbose; @@ -180,7 +180,8 @@ log_verbose_reset(void) */ void -log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) +log_init(const char *av0, LogLevel level, SyslogFacility facility, + int on_stderr) { argv0 = av0; diff --git a/usr.bin/ssh/log.h b/usr.bin/ssh/log.h index 0f029f18507..43be80a439d 100644 --- a/usr.bin/ssh/log.h +++ b/usr.bin/ssh/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.29 2020/10/18 11:21:59 djm Exp $ */ +/* $OpenBSD: log.h,v 1.30 2020/12/04 02:25:13 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -49,7 +49,7 @@ typedef enum { typedef void (log_handler_fn)(const char *, const char *, int, LogLevel, const char *, void *); -void log_init(char *, LogLevel, SyslogFacility, int); +void log_init(const char *, LogLevel, SyslogFacility, int); LogLevel log_level_get(void); int log_change_level(LogLevel); int log_is_on_stderr(void); |