From 7720844624960b44d79757c96eb9757cd1eee5a9 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 13 May 2007 22:32:33 +0000 Subject: [PATCH] Reapply part of rev 1.2 warning cleanup, it was lost in next revision --- servers/slapd/overlays/constraint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) { -- 2.39.5