summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2014-05-22 05:44:59 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2014-05-22 05:44:59 (GMT)
commitce36fcc131fb6d3b5ccf582869c5c511b736a10b (patch) (side-by-side diff)
tree1118d9a4e267bd4c3a186fba6ca9d85c0ead8e09
parent66e3cfbe02297912071adbb7cc59e5f4eb5781d1 (diff)
downloadanubis-ce36fcc131fb6d3b5ccf582869c5c511b736a10b.tar.gz
anubis-ce36fcc131fb6d3b5ccf582869c5c511b736a10b.tar.bz2
Minor fixes.
* src/rcfile.c (control_parser): Fix argument to assign_string. * src/headers.h (anubis_db_open_t, anubis_db_open): Last argument is const char *. * src/anubisdb.c (anubis_db_open): Last argument is const char *. * src/anubisadm.c: Use const char * as a last argument to anubis_db_open. * src/authmode.c: Likewise. * src/dbtext.c: Likewise. * src/gdbm.c: Likewise. * src/mysql.c: Likewise. * src/pgsql.c: Likewise.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/anubisadm.c4
-rw-r--r--src/anubisdb.c3
-rw-r--r--src/authmode.c2
-rw-r--r--src/dbtext.c2
-rw-r--r--src/gdbm.c2
-rw-r--r--src/headers.h4
-rw-r--r--src/mysql.c2
-rw-r--r--src/pgsql.c2
-rw-r--r--src/rcfile.c2
9 files changed, 12 insertions, 11 deletions
diff --git a/src/anubisadm.c b/src/anubisadm.c
index a3a0def..1eff9cb 100644
--- a/src/anubisadm.c
+++ b/src/anubisadm.c
@@ -53,7 +53,7 @@ int
opendb (void **dptr, int argc, char **argv, enum anubis_db_mode mode)
{
int rc;
- char *err;
+ char const *err;
if (argc == 0)
{
@@ -233,7 +233,7 @@ op_add_or_modify (char *database, int code, char *errmsg)
{
ANUBIS_USER rec;
void *db;
- char *err;
+ char const *err;
int rc;
if (!authid)
diff --git a/src/anubisdb.c b/src/anubisdb.c
index accd8bd..5e9bf83 100644
--- a/src/anubisdb.c
+++ b/src/anubisdb.c
@@ -84,7 +84,8 @@ anubis_db_register (const char *dbid,
int
-anubis_db_open (char *arg, enum anubis_db_mode mode, void **dptr, char **err)
+anubis_db_open (char *arg, enum anubis_db_mode mode, void **dptr,
+ char const **err)
{
struct anubis_db_instance *inst;
ANUBIS_URL *url;
diff --git a/src/authmode.c b/src/authmode.c
index 950b1ec..f81a0fe 100644
--- a/src/authmode.c
+++ b/src/authmode.c
@@ -501,7 +501,7 @@ anubis_get_db_record (const char *username, ANUBIS_USER * usr)
{
void *db;
int rc;
- char *errtext;
+ char const *errtext;
if (!anubis_dbarg)
{
diff --git a/src/dbtext.c b/src/dbtext.c
index cd6467f..d0fc083 100644
--- a/src/dbtext.c
+++ b/src/dbtext.c
@@ -26,7 +26,7 @@
/* Open the plaintext database. ARG is the full pathname to the file */
static int
dbtext_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode,
- char **errp)
+ char const **errp)
{
FILE *fp;
char *tmode;
diff --git a/src/gdbm.c b/src/gdbm.c
index 3e69bbe..58153f8 100644
--- a/src/gdbm.c
+++ b/src/gdbm.c
@@ -34,7 +34,7 @@
static int
gdbm_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode,
- char **errp)
+ char const **errp)
{
GDBM_FILE dbf;
int flags;
diff --git a/src/headers.h b/src/headers.h
index dd4ad5f..55665e2 100644
--- a/src/headers.h
+++ b/src/headers.h
@@ -574,7 +574,7 @@ enum anubis_db_mode
only) */
typedef int (*anubis_db_open_t) (void **d, ANUBIS_URL * url,
- enum anubis_db_mode mode, char **errp);
+ enum anubis_db_mode mode, char const **errp);
typedef int (*anubis_db_close_t) (void *d);
typedef int (*anubis_db_io_t) (void *d, const char *key, ANUBIS_USER * rec,
int *ecode);
@@ -591,7 +591,7 @@ int anubis_db_register (const char *dbid,
anubis_db_get_list_t _db_list,
anubis_db_strerror_t _db_strerror);
int anubis_db_open (char *arg, enum anubis_db_mode mode, void **dptr,
- char **errp);
+ char const **errp);
int anubis_db_close (void **dptr);
int anubis_db_get_record (void *dptr, const char *key, ANUBIS_USER * rec);
int anubis_db_put_record (void *dptr, const char *key, ANUBIS_USER * rec);
diff --git a/src/mysql.c b/src/mysql.c
index 81ea62c..5673aec 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -115,7 +115,7 @@ my_sql_get_column (struct anubis_sql_db *amp, size_t i)
/* Open the plaintext database. ARG is the full pathname to the file */
static int
mysql_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode,
- char **errp)
+ char const **errp)
{
struct anubis_sql_db *amp = NULL;
const char *table = anubis_url_get_arg (url, "table");
diff --git a/src/pgsql.c b/src/pgsql.c
index 4ae94e1..0cb30fa 100644
--- a/src/pgsql.c
+++ b/src/pgsql.c
@@ -140,7 +140,7 @@ pg_sql_get_column (struct anubis_sql_db *amp, size_t i)
/* Open the plaintext database. ARG is the full pathname to the file */
static int
pgsql_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode,
- char **errp)
+ char const **errp)
{
struct anubis_sql_db *amp = NULL;
const char *table = anubis_url_get_arg (url, "table");
diff --git a/src/rcfile.c b/src/rcfile.c
index 7fa5db2..27033c3 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -573,7 +573,7 @@ control_parser (EVAL_ENV env, int key, ANUBIS_LIST arglist, void *inv_data)
{
*p++ = 0;
assign_string (&session.socks_password, p);
- assign_string (session.socks_username, arg);
+ assign_string (&session.socks_username, arg);
topt |= T_SOCKS_AUTH;
}
break;

Return to:

Send suggestions and report system problems to the System administrator.