summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-27 21:23:40 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-27 21:23:40 +0000
commit5e0a76975d6acae6580dd13f1d0ec89b7c09d023 (patch)
tree56183bceec7cc44aa72fe01c0973c0dd32573b58 /usr.sbin
parentf38a877d9c4748f98c02a99ee86580846b6b6ec0 (diff)
constify log_addr and log_ntoa's returns, reminded by claudio
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/bgpd.h6
-rw-r--r--usr.sbin/bgpd/log.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index d33a0833e61..7197d1e49e0 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.82 2004/01/27 16:49:53 henning Exp $ */
+/* $OpenBSD: bgpd.h,v 1.83 2004/01/27 21:23:39 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -293,8 +293,8 @@ void log_debug(const char *, ...);
void fatal(const char *);
void fatalx(const char *);
void fatal_ensure(const char *, int, const char *);
-char *log_ntoa(in_addr_t);
-char *log_addr(const struct bgpd_addr *);
+const char *log_ntoa(in_addr_t);
+const char *log_addr(const struct bgpd_addr *);
/* parse.y */
int cmdline_symset(char *);
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index 1fda8f69fb4..59ec9c8f03d 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.24 2004/01/27 21:20:44 henning Exp $ */
+/* $OpenBSD: log.c,v 1.25 2004/01/27 21:23:39 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -107,7 +107,7 @@ void logit(int, const char *, ...);
char *
log_fmt_peer(const struct peer_config *peer)
{
- char *ip;
+ const char *ip;
char *pfmt;
ip = log_addr(&peer->remote_addr);
@@ -373,7 +373,7 @@ log_conn_attempt(const struct peer *peer, struct in_addr remote)
}
}
-char *
+const char *
log_ntoa(in_addr_t ip)
{
struct in_addr ina;
@@ -382,7 +382,7 @@ log_ntoa(in_addr_t ip)
return (inet_ntoa(ina));
}
-char *
+const char *
log_addr(const struct bgpd_addr *addr)
{
static char buf[48];