mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Some constification & lint removal
This commit is contained in:
parent
203f5b058f
commit
4a5e2febed
@ -161,7 +161,7 @@ ldap_matchingrule2str LDAP_P((
|
||||
|
||||
LDAP_F( char *)
|
||||
ldap_scherr2str LDAP_P((
|
||||
int code ));
|
||||
int code )) LDAP_GCCATTR((const));
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
@ -1834,7 +1834,7 @@ ldap_str2objectclass( const char * s, int * code, const char ** errp )
|
||||
}
|
||||
}
|
||||
|
||||
static char *err2text[] = {
|
||||
static char *const err2text[] = {
|
||||
"",
|
||||
"Out of memory",
|
||||
"Unexpected token",
|
||||
|
@ -35,7 +35,9 @@ static unsigned long conn_nextid = 0;
|
||||
#define SLAP_C_BINDING 0x03 /* binding */
|
||||
#define SLAP_C_CLOSING 0x04 /* closing */
|
||||
|
||||
char* connection_state2str( int state ) {
|
||||
const char *
|
||||
connection_state2str( int state )
|
||||
{
|
||||
switch( state ) {
|
||||
case SLAP_C_INVALID: return "!";
|
||||
case SLAP_C_INACTIVE: return "|";
|
||||
|
@ -189,7 +189,7 @@ long connection_init LDAP_P((
|
||||
|
||||
void connection_closing LDAP_P(( Connection *c ));
|
||||
int connection_state_closing LDAP_P(( Connection *c ));
|
||||
char *connection_state2str LDAP_P(( int state ));
|
||||
const char *connection_state2str LDAP_P(( int state )) LDAP_GCCATTR((const));
|
||||
|
||||
int connection_write LDAP_P((ber_socket_t s));
|
||||
int connection_read LDAP_P((ber_socket_t s));
|
||||
@ -387,7 +387,7 @@ void parse_oc_old LDAP_P(( Backend *be, const char *fname, int lineno, int argc,
|
||||
void parse_oc LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
|
||||
void parse_at LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
|
||||
void parse_oidm LDAP_P(( const char *fname, int lineno, int argc, char **argv ));
|
||||
char *scherr2str LDAP_P((int code));
|
||||
char *scherr2str LDAP_P((int code)) LDAP_GCCATTR((const));
|
||||
int dscompare LDAP_P(( const char *s1, const char *s2del, char delim ));
|
||||
/*
|
||||
* str2filter.c
|
||||
|
@ -15,15 +15,13 @@
|
||||
#include "slap.h"
|
||||
#include "ldap_schema.h"
|
||||
|
||||
static Avlnode *object_classes = NULL;
|
||||
|
||||
int global_schemacheck = 1; /* schemacheck on is default */
|
||||
|
||||
static void oc_usage_old(void) LDAP_GCCATTR((noreturn));
|
||||
static void oc_usage(void) LDAP_GCCATTR((noreturn));
|
||||
static void at_usage(void) LDAP_GCCATTR((noreturn));
|
||||
|
||||
static char *err2text[] = {
|
||||
static char *const err2text[] = {
|
||||
"",
|
||||
"Out of memory",
|
||||
"Objectclass not found",
|
||||
|
Loading…
Reference in New Issue
Block a user