]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/limits.c
also log cookie parsing
[openldap] / servers / slapd / limits.c
index 5f1d83c7d40b978900b8fd93c9021740b537f68d..81f4027de36dceb52a2510dfacb0c4da98b6b0ed 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -502,7 +502,6 @@ limits_parse(
                        ad.bv_val = strchr( oc.bv_val, '/' );
                        if ( ad.bv_val != NULL ) {
                                const char      *text = NULL;
-                               int             rc;
 
                                oc.bv_len = ad.bv_val - oc.bv_val;
 
@@ -533,7 +532,6 @@ no_oc:;
 
                if ( group_ad == NULL ) {
                        const char      *text = NULL;
-                       int             rc;
                        
                        rc = slap_str2ad( SLAPD_GROUP_ATTR, &group_ad, &text );
 
@@ -945,7 +943,7 @@ limits_unparse_one( struct slap_limits_set *lim, int which, struct berval *bv, b
 {
        char *ptr;
 
-       if ( !bv || !bv->bv_val ) return;
+       if ( !bv || !bv->bv_val ) return -1;
 
        ptr = bv->bv_val;
 
@@ -1083,6 +1081,8 @@ t_hard:
                *ptr = '\0';
                bv->bv_len = ptr - bv->bv_val;
        }
+
+       return 0;
 }
 
 int