]> git.sur5r.net Git - openldap/blobdiff - libraries/librewrite/xmap.c
Replace PW_GECOS/PASSWD macros
[openldap] / libraries / librewrite / xmap.c
index 0448c8ee964a5bf3c901e72b6358df8cb3ac03fc..b2ea0cfe08a902dde3f385f69268fcf5857e346f 100644 (file)
@@ -259,11 +259,11 @@ rewrite_xmap_apply(
                        ldap_pvt_thread_mutex_unlock( &xpasswd_mutex );
 #endif /* USE_REWRITE_LDAP_PVT_THREADS */
 
-                       rc = REWRITE_NO_SUCH_OBJECT;
+                       rc = LDAP_NO_SUCH_OBJECT;
                        break;
                }
 
-#ifdef HAVE_PW_GECOS
+#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
                if ( pwd->pw_gecos != NULL && pwd->pw_gecos[0] != '\0' ) {
                        int l = strlen( pwd->pw_gecos );
                        
@@ -279,7 +279,7 @@ rewrite_xmap_apply(
                        }
                        val->bv_len = l;
                } else
-#endif /* HAVE_PW_GECOS */
+#endif /* HAVE_STRUCT_PASSWD_PW_GECOS */
                {
                        val->bv_val = strdup( key->bv_val );
                        val->bv_len = key->bv_len;
@@ -437,8 +437,8 @@ rewrite_xmap_destroy(
 {
        struct rewrite_map *map;
 
-       assert( pmap );
-       assert( *pmap );
+       assert( pmap != NULL );
+       assert( *pmap != NULL );
 
        map = *pmap;