String constants are const.
This commit is contained in:
parent
df29b70d0e
commit
bcb03e10af
|
@ -213,7 +213,7 @@ typedef struct {
|
|||
|
||||
void dict_register(const char *dict_name, DICT *dict_info)
|
||||
{
|
||||
char *myname = "dict_register";
|
||||
const char *myname = "dict_register";
|
||||
DICT_NODE *node;
|
||||
|
||||
if (dict_table == 0)
|
||||
|
@ -255,7 +255,7 @@ static void dict_node_free(char *ptr)
|
|||
|
||||
void dict_unregister(const char *dict_name)
|
||||
{
|
||||
char *myname = "dict_unregister";
|
||||
const char *myname = "dict_unregister";
|
||||
DICT_NODE *node;
|
||||
|
||||
if ((node = dict_node(dict_name)) == 0)
|
||||
|
@ -270,7 +270,7 @@ void dict_unregister(const char *dict_name)
|
|||
|
||||
void dict_update(const char *dict_name, const char *member, const char *value)
|
||||
{
|
||||
char *myname = "dict_update";
|
||||
const char *myname = "dict_update";
|
||||
DICT_NODE *node;
|
||||
DICT *dict;
|
||||
|
||||
|
@ -290,7 +290,7 @@ void dict_update(const char *dict_name, const char *member, const char *value
|
|||
|
||||
const char *dict_lookup(const char *dict_name, const char *member)
|
||||
{
|
||||
char *myname = "dict_lookup";
|
||||
const char *myname = "dict_lookup";
|
||||
DICT_NODE *node;
|
||||
DICT *dict;
|
||||
const char *ret = 0;
|
||||
|
@ -313,7 +313,7 @@ const char *dict_lookup(const char *dict_name, const char *member)
|
|||
|
||||
int dict_delete(const char *dict_name, const char *member)
|
||||
{
|
||||
char *myname = "dict_delete";
|
||||
const char *myname = "dict_delete";
|
||||
DICT_NODE *node;
|
||||
DICT *dict;
|
||||
int result;
|
||||
|
@ -338,7 +338,7 @@ int dict_delete(const char *dict_name, const char *member)
|
|||
int dict_sequence(const char *dict_name, const int func,
|
||||
const char **member, const char **value)
|
||||
{
|
||||
char *myname = "dict_sequence";
|
||||
const char *myname = "dict_sequence";
|
||||
DICT_NODE *node;
|
||||
DICT *dict;
|
||||
|
||||
|
@ -428,7 +428,7 @@ struct dict_eval_context {
|
|||
static int dict_eval_action(int type, VSTRING *buf, char *ptr)
|
||||
{
|
||||
struct dict_eval_context *ctxt = (struct dict_eval_context *) ptr;
|
||||
char *myname = "dict_eval_action";
|
||||
const char *myname = "dict_eval_action";
|
||||
const char *pp;
|
||||
|
||||
if (msg_verbose)
|
||||
|
@ -521,7 +521,7 @@ void dict_walk(DICT_WALK_ACTION action, char *ptr)
|
|||
|
||||
int dict_changed(void)
|
||||
{
|
||||
char *myname = "dict_changed";
|
||||
const char *myname = "dict_changed";
|
||||
struct stat st;
|
||||
HTABLE_INFO **ht_info_list;
|
||||
HTABLE_INFO **ht;
|
||||
|
|
|
@ -267,7 +267,7 @@ static int dict_db_delete(DICT *dict, const char *key)
|
|||
static int dict_db_sequence(DICT *dict, const int function,
|
||||
const char **key, const char **value)
|
||||
{
|
||||
char *myname = "dict_db_sequence";
|
||||
const char *myname = "dict_db_sequence";
|
||||
DICT_DB *dict_db = (DICT_DB *) dict;
|
||||
DB *db = dict_db->db;
|
||||
DBT db_key;
|
||||
|
|
|
@ -242,7 +242,7 @@ static int dict_dbm_delete(DICT *dict, const char *key)
|
|||
static int dict_dbm_sequence(DICT *dict, const int function,
|
||||
const char **key, const char **value)
|
||||
{
|
||||
char *myname = "dict_dbm_sequence";
|
||||
const char *myname = "dict_dbm_sequence";
|
||||
DICT_DBM *dict_dbm = (DICT_DBM *) dict;
|
||||
datum dbm_key;
|
||||
datum dbm_value;
|
||||
|
|
|
@ -128,7 +128,7 @@ static void dict_ldap_timeout(int unused_sig)
|
|||
|
||||
static const char *dict_ldap_lookup(DICT *dict, const char *name)
|
||||
{
|
||||
char *myname = "dict_ldap_lookup";
|
||||
const char *myname = "dict_ldap_lookup";
|
||||
DICT_LDAP *dict_ldap = (DICT_LDAP *) dict;
|
||||
static VSTRING *result;
|
||||
LDAPMessage *res = 0;
|
||||
|
@ -365,7 +365,7 @@ static void dict_ldap_update(DICT *dict, const char *unused_name,
|
|||
|
||||
static void dict_ldap_close(DICT *dict)
|
||||
{
|
||||
char *myname = "dict_ldap_close";
|
||||
const char *myname = "dict_ldap_close";
|
||||
DICT_LDAP *dict_ldap = (DICT_LDAP *) dict;
|
||||
|
||||
if (dict_ldap->ld)
|
||||
|
@ -385,7 +385,7 @@ static void dict_ldap_close(DICT *dict)
|
|||
|
||||
DICT *dict_ldap_open(const char *ldapsource, int dummy, int dict_flags)
|
||||
{
|
||||
char *myname = "dict_ldap_open";
|
||||
const char *myname = "dict_ldap_open";
|
||||
DICT_LDAP *dict_ldap;
|
||||
VSTRING *config_param;
|
||||
int rc = 0;
|
||||
|
|
|
@ -77,7 +77,7 @@ static char *dict_nis_domain;
|
|||
|
||||
static void dict_nis_init(void)
|
||||
{
|
||||
char *myname = "dict_nis_init";
|
||||
const char *myname = "dict_nis_init";
|
||||
|
||||
if (yp_get_default_domain(&dict_nis_domain) != 0
|
||||
|| dict_nis_domain == 0 || *dict_nis_domain == 0
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
* lookup table for available map types.
|
||||
*/
|
||||
typedef struct {
|
||||
char *type;
|
||||
const char *type;
|
||||
struct DICT *(*open) (const char *, int, int);
|
||||
} DICT_OPEN_INFO;
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ DICT *dict_unix_open(const char *map, int unused_flags, int dict_flags)
|
|||
{
|
||||
DICT_UNIX *dict_unix;
|
||||
struct dict_unix_lookup {
|
||||
char *name;
|
||||
const char *name;
|
||||
const char *(*lookup) (DICT *, const char *);
|
||||
};
|
||||
static struct dict_unix_lookup dict_unix_lookup[] = {
|
||||
|
|
Loading…
Reference in New Issue