From ad9e4e4095e2c7baeb120b456e1472624b6f270f Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Wed, 2 Apr 2008 16:55:01 +0400 Subject: [PATCH] get_printable_kline(..) fix --- include/s_conf.h | 4 ++-- src/s_conf.c | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/s_conf.h b/include/s_conf.h index c44d1ff..3fa389d 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -337,8 +337,8 @@ extern struct ConfItem *find_tkline(const char *, const char *, struct sockaddr extern char *show_iline_prefix(struct Client *, struct ConfItem *, char *); extern void get_printable_conf(struct ConfItem *, char **, char **, char **, char **, int *, char **); -extern void get_printable_kline(struct Client *, struct ConfItem *, - char **, char **, char **, char **); +void get_printable_kline(struct Client *, struct ConfItem *, + const char **, const char **, const char **, const char **); extern void yyerror(const char *); extern int conf_yy_fatal_error(const char *); diff --git a/src/s_conf.c b/src/s_conf.c index 76f1f79..9ea157a 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -1120,21 +1120,21 @@ get_printable_conf(struct ConfItem *aconf, char **name, char **host, *port = (int) aconf->port; } -void -get_printable_kline(struct Client *source_p, struct ConfItem *aconf, - char **host, char **reason, - char **user, char **oper_reason) -{ - static char null[] = ""; - - *host = EmptyString(aconf->host) ? null : aconf->host; - *reason = EmptyString(aconf->passwd) ? null : aconf->passwd; - *user = EmptyString(aconf->user) ? null : aconf->user; - - if(EmptyString(aconf->spasswd) || !IsOper(source_p)) - *oper_reason = NULL; - else - *oper_reason = aconf->spasswd; +void +get_printable_kline(struct Client *source_p, struct ConfItem *aconf, + const char **host, const char **reason, + const char **user, const char **oper_reason) +{ + static const char *null = ""; + + *host = EmptyString(aconf->host) ? null : aconf->host; + *reason = EmptyString(aconf->passwd) ? null : aconf->passwd; + *user = EmptyString(aconf->user) ? null : aconf->user; + + if(EmptyString(aconf->spasswd) || !IsOper(source_p)) + *oper_reason = NULL; + else + *oper_reason = aconf->spasswd; } /*