From 0ee108c29129f774a3e4777490f51747729d3f5f Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 9 Jul 2001 12:07:25 +0000 Subject: [PATCH] * logger.c (severity2string): Declare as returning const char *. (klog_com_err_proc): Do not discard const status of format string. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13591 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/ChangeLog | 5 +++++ src/lib/kadm5/logger.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lib/kadm5/ChangeLog b/src/lib/kadm5/ChangeLog index 52ae21af2..7b60b2c50 100644 --- a/src/lib/kadm5/ChangeLog +++ b/src/lib/kadm5/ChangeLog @@ -1,3 +1,8 @@ +2001-07-08 Ezra Peisach + + * logger.c (severity2string): Declare as returning const char *. + (klog_com_err_proc): Do not discard const status of format string. + 2001-07-06 Ezra Peisach * server_internal.h: Add prototype for krb5_copy_key_data_contents. diff --git a/src/lib/kadm5/logger.c b/src/lib/kadm5/logger.c index d16354401..3baad4801 100644 --- a/src/lib/kadm5/logger.c +++ b/src/lib/kadm5/logger.c @@ -182,7 +182,7 @@ klog_com_err_proc(whoami, code, format, ap) { char outbuf[KRB5_KLOG_MAX_ERRMSG_SIZE]; int lindex; - char *actual_format; + const char *actual_format; #ifdef HAVE_SYSLOG int log_pri = -1; #endif /* HAVE_SYSLOG */ @@ -205,7 +205,7 @@ klog_com_err_proc(whoami, code, format, ap) } cp = &outbuf[strlen(outbuf)]; - actual_format = (char *) format; + actual_format = format; #ifdef HAVE_SYSLOG /* * This is an unpleasant hack. If the first character is less than @@ -216,7 +216,7 @@ klog_com_err_proc(whoami, code, format, ap) * intermediate representation. */ if ((((unsigned char) *format) > 0) && (((unsigned char) *format) <= 8)) { - actual_format = (char *) (format + 1); + actual_format = (format + 1); switch ((unsigned char) *format) { #ifdef LOG_EMERG case 1: @@ -744,7 +744,7 @@ krb5_klog_close(kcontext) /* * severity2string() - Convert a severity to a string. */ -static char * +static const char * severity2string(severity) int severity; { @@ -793,7 +793,7 @@ severity2string(severity) break; #endif /* LOG_DEBUG */ } - return((char *) ss); + return(ss); } /* -- 2.26.2