From: Hallvard Furuseth Date: Sun, 13 May 2007 22:32:33 +0000 (+0000) Subject: Reapply part of rev 1.2 warning cleanup, it was lost in next revision X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~481 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7720844624960b44d79757c96eb9757cd1eee5a9;p=openldap Reapply part of rev 1.2 warning cleanup, it was lost in next revision --- diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c index c86c11a53a..299cd782a3 100644 --- a/servers/slapd/overlays/constraint.c +++ b/servers/slapd/overlays/constraint.c @@ -237,14 +237,14 @@ constraint_violation( constraint *c, struct berval *bv ) } static char * -print_message( const char *fmt, AttributeDescription *a ) +print_message( const char *errtext, AttributeDescription *a ) { char *ret; int sz; - sz = strlen(fmt) + a->ad_cname.bv_len + 1; + sz = strlen(errtext) + sizeof(" on ") + a->ad_cname.bv_len; ret = ch_malloc(sz); - snprintf( ret, sz, fmt, a->ad_cname.bv_val ); + snprintf( ret, sz, "%s on %s", errtext, a->ad_cname.bv_val ); return ret; } @@ -256,7 +256,7 @@ constraint_add( Operation *op, SlapReply *rs ) constraint *c = on->on_bi.bi_private, *cp; BerVarray b = NULL; int i; - const char *rsv = "add breaks regular expression constraint on %s"; + const char *rsv = "add breaks regular expression constraint"; char *msg; if ((a = op->ora_e->e_attrs) == NULL) { @@ -301,7 +301,7 @@ constraint_modify( Operation *op, SlapReply *rs ) Modifications *m; BerVarray b = NULL; int i; - const char *rsv = "modify breaks regular expression constraint on %s"; + const char *rsv = "modify breaks regular expression constraint"; char *msg; if ((m = op->orm_modlist) == NULL) {