/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2004 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
/*
* Keep only single escapes '%'
*/
- if ( p[ 0 ] != REWRITE_SUBMATCH_ESCAPE ) {
+ if ( !IS_REWRITE_SUBMATCH_ESCAPE( p[ 0 ] ) ) {
continue;
}
- if ( p[ 1 ] == REWRITE_SUBMATCH_ESCAPE ) {
+ if ( IS_REWRITE_SUBMATCH_ESCAPE( p[ 1 ] ) ) {
/* Pull &p[1] over p, including the trailing '\0' */
AC_MEMCPY((char *)p, &p[ 1 ], strlen( p ) );
continue;
if ( rc != REWRITE_SUCCESS ) {
rc = REWRITE_REGEXEC_ERR;
+ goto cleanup;
}
/*
int n;
struct rewrite_subst *subst;
- assert( psubst );
- assert( *psubst );
+ assert( psubst != NULL );
+ assert( *psubst != NULL );
subst = *psubst;