diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-03-31 21:42:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-03-31 21:42:06 +0000 |
commit | 9e91af1981f37954834b37ac955d4bbed57a51f2 (patch) | |
tree | f0fe0b654e55fb2a95f4a56409b4b36a142b435d | |
parent | 839ebd256a8eeb0d93c0bda8a41c6add71da179b (diff) |
Remove unused log functions.
-rw-r--r-- | usr.bin/tmux/log.c | 43 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 5 |
2 files changed, 3 insertions, 45 deletions
diff --git a/usr.bin/tmux/log.c b/usr.bin/tmux/log.c index 4e021e837be..b66a8f60292 100644 --- a/usr.bin/tmux/log.c +++ b/usr.bin/tmux/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.8 2012/05/30 15:01:21 nicm Exp $ */ +/* $OpenBSD: log.c,v 1.9 2014/03/31 21:42:05 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -41,7 +41,7 @@ __dead void log_vfatal(const char *, va_list); void log_event_cb(unused int severity, const char *msg) { - log_warnx("%s", msg); + log_debug("%s", msg); } /* Open logging to file. */ @@ -86,45 +86,6 @@ log_vwrite(const char *msg, va_list ap) free(fmt); } -/* Log a warning with error string. */ -void printflike1 -log_warn(const char *msg, ...) -{ - va_list ap; - char *fmt; - - va_start(ap, msg); - if (asprintf(&fmt, "%s: %s", msg, strerror(errno)) == -1) - exit(1); - log_vwrite(fmt, ap); - free(fmt); - va_end(ap); -} - -/* Log a warning. */ -void printflike1 -log_warnx(const char *msg, ...) -{ - va_list ap; - - va_start(ap, msg); - log_vwrite(msg, ap); - va_end(ap); -} - -/* Log an informational message. */ -void printflike1 -log_info(const char *msg, ...) -{ - va_list ap; - - if (log_level > -1) { - va_start(ap, msg); - log_vwrite(msg, ap); - va_end(ap); - } -} - /* Log a debug message. */ void printflike1 log_debug(const char *msg, ...) diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index f088f5f0b5c..d2d53d942fd 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.443 2014/03/31 21:40:21 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.444 2014/03/31 21:42:05 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -2343,9 +2343,6 @@ char *get_proc_name(int, char *); /* log.c */ void log_open(int, const char *); void log_close(void); -void printflike1 log_warn(const char *, ...); -void printflike1 log_warnx(const char *, ...); -void printflike1 log_info(const char *, ...); void printflike1 log_debug(const char *, ...); void printflike1 log_debug2(const char *, ...); __dead void printflike1 log_fatal(const char *, ...); |