diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-20 14:28:58 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-20 14:28:58 +0000 |
commit | 5d6d000f556f7fad5b4f403de837c7f80b480948 (patch) | |
tree | 5412d4bc8343a9d49f2ea079f916f7afe29c755a | |
parent | 7c9894d57a7f696a314e3b1ddb0b21a3f123dc4d (diff) |
constify parameters that are supposed to be const.
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/aliases.c | 8 | ||||
-rw-r--r-- | usr.sbin/smtpd/forward.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 14 | ||||
-rw-r--r-- | usr.sbin/smtpd/util.c | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index b991532d195..43c4073102b 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.53 2012/09/19 12:59:59 eric Exp $ */ +/* $OpenBSD: aliases.c,v 1.54 2012/09/20 14:28:57 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -41,7 +41,7 @@ static int alias_is_filename(struct expandnode *, const char *, size_t); static int alias_is_include(struct expandnode *, const char *, size_t); int -aliases_get(objid_t mapid, struct expandtree *expandtree, char *username) +aliases_get(objid_t mapid, struct expandtree *expandtree, const char *username) { struct map_alias *map_alias; struct expandnode *xn; @@ -74,7 +74,7 @@ aliases_get(objid_t mapid, struct expandtree *expandtree, char *username) int aliases_virtual_get(objid_t mapid, struct expandtree *expandtree, - struct mailaddr *maddr) + const struct mailaddr *maddr) { struct map_virtual *map_virtual; struct expandnode *xn; @@ -115,7 +115,7 @@ aliases_virtual_get(objid_t mapid, struct expandtree *expandtree, } int -aliases_vdomain_exists(objid_t mapid, char *hostname) +aliases_vdomain_exists(objid_t mapid, const char *hostname) { struct map_virtual *map_virtual; char buf[MAXHOSTNAMELEN]; diff --git a/usr.sbin/smtpd/forward.c b/usr.sbin/smtpd/forward.c index c6a46fd57b5..a4714fb2172 100644 --- a/usr.sbin/smtpd/forward.c +++ b/usr.sbin/smtpd/forward.c @@ -1,4 +1,4 @@ -/* $OpenBSD: forward.c,v 1.27 2012/09/19 12:59:59 eric Exp $ */ +/* $OpenBSD: forward.c,v 1.28 2012/09/20 14:28:57 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -34,7 +34,7 @@ #include "log.h" int -forwards_get(int fd, struct expandtree *expandtree, char *as_user) +forwards_get(int fd, struct expandtree *expandtree, const char *as_user) { FILE *fp; char *buf, *lbuf, *p, *cp; diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 1c185bfa98f..81d49d4f550 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.360 2012/09/19 18:20:36 eric Exp $ */ +/* $OpenBSD: smtpd.h,v 1.361 2012/09/20 14:28:57 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -927,9 +927,9 @@ extern void (*imsg_callback)(struct imsgev *, struct imsg *); /* aliases.c */ -int aliases_get(objid_t, struct expandtree *, char *); -int aliases_virtual_get(objid_t, struct expandtree *, struct mailaddr *); -int aliases_vdomain_exists(objid_t, char *); +int aliases_get(objid_t, struct expandtree *, const char *); +int aliases_virtual_get(objid_t, struct expandtree *, const struct mailaddr *); +int aliases_vdomain_exists(objid_t, const char *); int alias_parse(struct expandnode *, char *); @@ -995,7 +995,7 @@ void expand_free(struct expandtree *); RB_PROTOTYPE(expandtree, expandnode, nodes, expand_cmp); /* forward.c */ -int forwards_get(int, struct expandtree *, char *); +int forwards_get(int, struct expandtree *, const char *); /* lka.c */ @@ -1177,8 +1177,8 @@ char *ss_to_text(struct sockaddr_storage *); char *time_to_text(time_t); char *duration_to_text(time_t); int secure_file(int, char *, char *, uid_t, int); -int lowercase(char *, char *, size_t); -void xlowercase(char *, char *, size_t); +int lowercase(char *, const char *, size_t); +void xlowercase(char *, const char *, size_t); void sa_set_port(struct sockaddr *, int); uint64_t generate_uid(void); void fdlimit(double); diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c index 05b98c4a05d..3bf79d433eb 100644 --- a/usr.sbin/smtpd/util.c +++ b/usr.sbin/smtpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.78 2012/09/18 14:23:01 eric Exp $ */ +/* $OpenBSD: util.c,v 1.79 2012/09/20 14:28:57 eric Exp $ */ /* * Copyright (c) 2000,2001 Markus Friedl. All rights reserved. @@ -799,7 +799,7 @@ addargs(arglist *args, char *fmt, ...) } int -lowercase(char *buf, char *s, size_t len) +lowercase(char *buf, const char *s, size_t len) { if (len == 0) return 0; @@ -816,7 +816,7 @@ lowercase(char *buf, char *s, size_t len) } void -xlowercase(char *buf, char *s, size_t len) +xlowercase(char *buf, const char *s, size_t len) { if (len == 0) fatalx("lowercase: len == 0"); |