diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-04-20 12:13:20 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-04-20 12:13:20 +0000 |
commit | ff51dafc77813d061eda456c01b8f98e5cddda37 (patch) | |
tree | 1f2379b0d3f2ea970ac24f0d95f001d71b6f9260 /usr.bin/cvs | |
parent | 8d0545f99cc0d06974614877161d7922e050368f (diff) |
change cvs_log() and cvs_vlog() return type to void; OK niallo@.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/log.c | 17 | ||||
-rw-r--r-- | usr.bin/cvs/log.h | 6 |
2 files changed, 9 insertions, 14 deletions
diff --git a/usr.bin/cvs/log.c b/usr.bin/cvs/log.c index 3c80790556f..94b02d0305c 100644 --- a/usr.bin/cvs/log.c +++ b/usr.bin/cvs/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.33 2006/04/14 02:45:35 deraadt Exp $ */ +/* $OpenBSD: log.c,v 1.34 2006/04/20 12:13:19 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -171,17 +171,14 @@ cvs_log_filter(u_int how, u_int level) * The <fmt> argument should not have a terminating newline, as this is taken * care of by the logging facility. */ -int +void cvs_log(u_int level, const char *fmt, ...) { - int ret; va_list vap; va_start(vap, fmt); - ret = cvs_vlog(level, fmt, vap); + cvs_vlog(level, fmt, vap); va_end(vap); - - return (ret); } @@ -191,7 +188,7 @@ cvs_log(u_int level, const char *fmt, ...) * The <fmt> argument should not have a terminating newline, as this is taken * care of by the logging facility. */ -int +void cvs_vlog(u_int level, const char *fmt, va_list vap) { int ecp; @@ -203,11 +200,11 @@ cvs_vlog(u_int level, const char *fmt, va_list vap) #endif if (level > LP_MAX) - return (-1); + fatal("cvs_vlog failed"); /* apply any filters */ if (CVS_LOG_FLTRGET(level)) - return (0); + return; if (level == LP_ERRNO) ecp = errno; @@ -281,8 +278,6 @@ cvs_vlog(u_int level, const char *fmt, va_list vap) /* preserve it just in case we changed it? */ if (level == LP_ERRNO) errno = ecp; - - return (0); } diff --git a/usr.bin/cvs/log.h b/usr.bin/cvs/log.h index 6044110197c..a5490d12b1f 100644 --- a/usr.bin/cvs/log.h +++ b/usr.bin/cvs/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.17 2006/03/15 21:34:59 niallo Exp $ */ +/* $OpenBSD: log.h,v 1.18 2006/04/20 12:13:19 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -59,8 +59,8 @@ void cvs_log_init(u_int, u_int); void cvs_log_cleanup(void); int cvs_log_filter(u_int, u_int); -int cvs_log(u_int, const char *, ...) __attribute__((format(printf, 2, 3))); -int cvs_vlog(u_int, const char *, va_list); +void cvs_log(u_int, const char *, ...) __attribute__((format(printf, 2, 3))); +void cvs_vlog(u_int, const char *, va_list); int cvs_printf(const char *, ...) __attribute__((format(printf, 1, 2))); void fatal(const char *, ...) __dead __attribute__((format(printf, 1,2))); |