]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/aclparse.c
Rework ac/socket.h for HAVE_WINSOCK:
[openldap] / servers / slapd / aclparse.c
index 63a509784e109c75d8c33d51e69e97fc4feefd9d..b7b0d9507ab8b5684e577cb2e860fbf4995a504f 100644 (file)
@@ -87,7 +87,7 @@ parse_acl(
 )
 {
        int             i;
-       char            *e, *left, *right;
+       char            *left, *right;
        struct acl      *a;
        struct access   *b;
 
@@ -160,7 +160,7 @@ parse_acl(
 
                                        alist = str2charray( right, "," );
                                        charray_merge( &a->acl_attrs, alist );
-                                       free( alist );
+                                       charray_free( alist );
                                } else {
                                        fprintf( stderr,
                                                "%s: line %d: expecting <what> got \"%s\"\n",
@@ -181,8 +181,7 @@ parse_acl(
                         * by clause consists of <who> and <access>
                         */
 
-                       b = (struct access *) ch_calloc( 1,
-                           sizeof(struct access) );
+                       b = (struct access *) ch_calloc( 1, sizeof(struct access) );
 
                        if ( ++i == argc ) {
                                fprintf( stderr,
@@ -243,7 +242,7 @@ parse_acl(
 
                                /* normalize the domain */
                                for ( s = b->a_domainpat; *s; s++ ) {
-                                       *s = TOLOWER( *s );
+                                       *s = TOLOWER( (unsigned char) *s );
                                }
                        } else if ( strcasecmp( left, "addr" ) == 0 ) {
                                regtest(fname, lineno, right);