summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2012-09-25 17:38:55 +0000
committereric <eric@openbsd.org>2012-09-25 17:38:55 +0000
commita1c4f1df4b9145d9cd86cdd7a126f0201a732f6f (patch)
tree3fa01ba06b427e5aec245e3bbb7d1bb328b4c80a
parentneed inttypes.h (diff)
downloadwireguard-openbsd-a1c4f1df4b9145d9cd86cdd7a126f0201a732f6f.tar.xz
wireguard-openbsd-a1c4f1df4b9145d9cd86cdd7a126f0201a732f6f.zip
make const arguments const, and static functions static.
ok chl@
-rw-r--r--usr.sbin/smtpd/smtpd.h4
-rw-r--r--usr.sbin/smtpd/user_pwd.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 0bc17424876..96e99cba981 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.366 2012/09/21 19:37:08 eric Exp $ */
+/* $OpenBSD: smtpd.h,v 1.367 2012/09/25 17:38:55 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -821,7 +821,7 @@ struct mta_user {
};
struct user_backend {
- int (*getbyname)(struct mta_user *, char *);
+ int (*getbyname)(struct mta_user *, const char *);
};
diff --git a/usr.sbin/smtpd/user_pwd.c b/usr.sbin/smtpd/user_pwd.c
index 474a5dd20d5..95100668e02 100644
--- a/usr.sbin/smtpd/user_pwd.c
+++ b/usr.sbin/smtpd/user_pwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: user_pwd.c,v 1.2 2012/08/25 15:39:11 gilles Exp $ */
+/* $OpenBSD: user_pwd.c,v 1.3 2012/09/25 17:38:55 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org>
@@ -35,14 +35,14 @@
#include "smtpd.h"
#include "log.h"
-int user_getpw_ret(struct mta_user *, struct passwd *); /* helper */
-int user_getpwnam(struct mta_user *, char *);
+static int user_getpw_ret(struct mta_user *, struct passwd *); /* helper */
+static int user_getpwnam(struct mta_user *, const char *);
struct user_backend user_backend_pwd = {
user_getpwnam
};
-int
+static int
user_getpw_ret(struct mta_user *u, struct passwd *pw)
{
if (strlcpy(u->username, pw->pw_name, sizeof (u->username))
@@ -63,8 +63,8 @@ user_getpw_ret(struct mta_user *u, struct passwd *pw)
return 1;
}
-int
-user_getpwnam(struct mta_user *u, char *username)
+static int
+user_getpwnam(struct mta_user *u, const char *username)
{
struct passwd *pw;