Some constification & lint removal

This commit is contained in:
Hallvard Furuseth 1999-09-04 21:15:49 +00:00
parent 203f5b058f
commit 4a5e2febed
5 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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",

View File

@ -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 "|";

View File

@ -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

View File

@ -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",