diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-06-12 10:27:09 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-06-12 10:27:09 +0000 |
commit | 84ace43c70d369c34fd8b6e4eb0c242eef859b76 (patch) | |
tree | 66999cb57c79e97c56d7d27845b52b2b9e936aae /auth | |
parent | e509ce1f1001802e60ce2bbc3e05fe0381829e2a (diff) | |
download | mailutils-84ace43c70d369c34fd8b6e4eb0c242eef859b76.tar.gz mailutils-84ace43c70d369c34fd8b6e4eb0c242eef859b76.tar.bz2 |
Revised use of const modifiers
Diffstat (limited to 'auth')
-rw-r--r-- | auth/gsasl.c | 2 | ||||
-rw-r--r-- | auth/lbuf.c | 4 | ||||
-rw-r--r-- | auth/lbuf.h | 5 | ||||
-rw-r--r-- | auth/mysql.c | 5 | ||||
-rw-r--r-- | auth/pam.c | 6 | ||||
-rw-r--r-- | auth/pgsql.c | 11 | ||||
-rw-r--r-- | auth/sql.c | 9 | ||||
-rw-r--r-- | auth/tls.c | 2 | ||||
-rw-r--r-- | auth/virtual.c | 7 |
9 files changed, 29 insertions, 22 deletions
diff --git a/auth/gsasl.c b/auth/gsasl.c index 418c9ab92..e2de6a2ed 100644 --- a/auth/gsasl.c +++ b/auth/gsasl.c @@ -253,7 +253,7 @@ _gsasl_open (stream_t stream) } int -_gsasl_strerror (stream_t stream, char **pstr) +_gsasl_strerror (stream_t stream, const char **pstr) { struct _gsasl_stream *s = stream_get_owner (stream); *pstr = gsasl_strerror (s->last_err); diff --git a/auth/lbuf.c b/auth/lbuf.c index d93a3d9ca..b405e900b 100644 --- a/auth/lbuf.c +++ b/auth/lbuf.c @@ -85,7 +85,7 @@ _auth_lb_grow (struct _line_buffer *s, const char *ptr, size_t size) } int -_auth_lb_read (struct _line_buffer *s, const char *optr, size_t osize) +_auth_lb_read (struct _line_buffer *s, char *optr, size_t osize) { int len; @@ -103,7 +103,7 @@ _auth_lb_read (struct _line_buffer *s, const char *optr, size_t osize) } int -_auth_lb_readline (struct _line_buffer *s, const char *ptr, size_t size) +_auth_lb_readline (struct _line_buffer *s, char *ptr, size_t size) { char *p = strchr (s->buffer, '\n'); diff --git a/auth/lbuf.h b/auth/lbuf.h index 534ff226f..558e15b05 100644 --- a/auth/lbuf.h +++ b/auth/lbuf.h @@ -24,9 +24,8 @@ void _auth_lb_destroy __P((struct _line_buffer **s)); void _auth_lb_drop __P((struct _line_buffer *s)); int _auth_lb_grow __P((struct _line_buffer *s, const char *ptr, size_t size)); -int _auth_lb_read __P((struct _line_buffer *s, const char *ptr, size_t size)); -int _auth_lb_readline __P((struct _line_buffer *s, const char *ptr, - size_t size)); +int _auth_lb_read __P((struct _line_buffer *s, char *ptr, size_t size)); +int _auth_lb_readline __P((struct _line_buffer *s, char *ptr, size_t size)); int _auth_lb_writelines __P((struct _line_buffer *s, const char *iptr, size_t isize, off_t offset, int (*wr) __PMT ((void *data, char *start, diff --git a/auth/mysql.c b/auth/mysql.c index e35f9dbb1..a6cd50541 100644 --- a/auth/mysql.c +++ b/auth/mysql.c @@ -29,7 +29,8 @@ int -mysql_auth_sql_by_name (struct mu_auth_data **return_data, void *key, +mysql_auth_sql_by_name (struct mu_auth_data **return_data, + const void *key, void *func_data ARG_UNUSED, void *call_data ARG_UNUSED) { @@ -224,7 +225,7 @@ mysql_auth_sql_by_uid (struct mu_auth_data **return_data, void *key, int mysql_sql_authenticate (struct mu_auth_data **return_data ARG_UNUSED, - void *key, + const void *key, void *func_data ARG_UNUSED, void *call_data) { struct mu_auth_data *auth_data = key; diff --git a/auth/pam.c b/auth/pam.c index b0150f95d..217d9537c 100644 --- a/auth/pam.c +++ b/auth/pam.c @@ -102,11 +102,11 @@ static struct pam_conv PAM_conversation = { &mu_pam_conv, NULL }; int mu_authenticate_pam (struct mu_auth_data **return_data ARG_UNUSED, - void *key, + const void *key, void *func_data ARG_UNUSED, void *call_data) { - struct mu_auth_data *auth_data = key; + const struct mu_auth_data *auth_data = key; char *pass = call_data; pam_handle_t *pamh; int pamerror; @@ -164,7 +164,7 @@ struct argp mu_pam_argp = { int mu_authenticate_pam (struct mu_auth_data **return_data ARG_UNUSED, - void *key ARG_UNUSED, + const void *key ARG_UNUSED, void *func_data ARG_UNUSED, void *call_data ARG_UNUSED) { diff --git a/auth/pgsql.c b/auth/pgsql.c index 744df5fd6..1c40759a8 100644 --- a/auth/pgsql.c +++ b/auth/pgsql.c @@ -136,7 +136,8 @@ pg_auth_common (PGresult *res, char *query_str, struct mu_auth_data **auth) } int -pg_auth_sql_by_name (struct mu_auth_data **return_data, void *key, +pg_auth_sql_by_name (struct mu_auth_data **return_data, + const void *key, void *func_data ARG_UNUSED, void *call_data ARG_UNUSED) { @@ -185,7 +186,8 @@ pg_auth_sql_by_name (struct mu_auth_data **return_data, void *key, } int -pg_auth_sql_by_uid (struct mu_auth_data **return_data, void *key, +pg_auth_sql_by_uid (struct mu_auth_data **return_data, + const void *key, void *func_data ARG_UNUSED, void *call_data ARG_UNUSED) { @@ -235,13 +237,14 @@ pg_auth_sql_by_uid (struct mu_auth_data **return_data, void *key, } int -pg_sql_authenticate (struct mu_auth_data **return_data ARG_UNUSED, void *key, +pg_sql_authenticate (struct mu_auth_data **return_data ARG_UNUSED, + const void *key, void *func_data ARG_UNUSED, void *call_data) { PGconn *conn; PGresult *res = NULL; - struct mu_auth_data *auth_data = key; + const struct mu_auth_data *auth_data = key; char *pass = call_data; char *query_str = NULL; int rc = 1; diff --git a/auth/sql.c b/auth/sql.c index ef08bfeca..de6f07c14 100644 --- a/auth/sql.c +++ b/auth/sql.c @@ -214,11 +214,14 @@ struct argp mu_sql_argp = { # ifdef HAVE_MYSQL -int mysql_auth_sql_by_name __P((struct mu_auth_data **return_data, void *key, +int mysql_auth_sql_by_name __P((struct mu_auth_data **return_data, + const void *key, void *func_data, void *call_data)); -int mysql_auth_sql_by_uid __P((struct mu_auth_data **return_data, void *key, +int mysql_auth_sql_by_uid __P((struct mu_auth_data **return_data, + const void *key, void *func_data, void *call_data)); -int mysql_sql_authenticate __P((struct mu_auth_data **return_data, void *key, +int mysql_sql_authenticate __P((struct mu_auth_data **return_data, + const void *key, void *func_data, void *call_data)); # define mu_sql_authenticate mysql_sql_authenticate diff --git a/auth/tls.c b/auth/tls.c index 91a1d7106..905d299ad 100644 --- a/auth/tls.c +++ b/auth/tls.c @@ -534,7 +534,7 @@ _tls_open_client (stream_t stream) } int -_tls_strerror (stream_t stream, char **pstr) +_tls_strerror (stream_t stream, const char **pstr) { struct _tls_stream *s = stream_get_owner (stream); *pstr = gnutls_strerror (s->last_err); diff --git a/auth/virtual.c b/auth/virtual.c index 07977929b..7902777fd 100644 --- a/auth/virtual.c +++ b/auth/virtual.c @@ -57,7 +57,7 @@ static char *site_virtual_pwddir = SITE_VIRTUAL_PWDDIR; static struct passwd * -getpwnam_virtual (char *u) +getpwnam_virtual (const char *u) { struct passwd *pw = NULL; FILE *pfile; @@ -133,7 +133,8 @@ getpwnam_ip_virtual (const char *u) /* Virtual domains */ static int -mu_auth_virt_domain_by_name (struct mu_auth_data **return_data, void *key, +mu_auth_virt_domain_by_name (struct mu_auth_data **return_data, + const void *key, void *unused_func_data, void *unused_call_data) { int rc; @@ -202,7 +203,7 @@ struct argp mu_virt_argp = { #else static int mu_auth_virt_domain_by_name (struct mu_auth_data **return_data ARG_UNUSED, - void *key ARG_UNUSED, + const void *key ARG_UNUSED, void *func_data ARG_UNUSED, void *call_data ARG_UNUSED) { |