From abe484dd08d5a2fb7092d2fc44a54a3e2f6b70d9 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount <quanah@openldap.org> Date: Wed, 26 Sep 2007 17:50:48 +0000 Subject: [PATCH] init j, log unknown message type --- servers/slapd/syncrepl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index db87e5205c..d41caa5200 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1064,7 +1064,9 @@ do_syncrep2( default: Debug( LDAP_DEBUG_ANY, "do_syncrep2: %s " - "unknown message\n", si->si_ridtxt, 0, 0 ); + "unknown message (0x%02lx)\n", + si->si_ridtxt, + (unsigned long)ldap_msgtype( msg ), 0 ); break; } @@ -2695,10 +2697,10 @@ attr_cmp( Operation *op, Attribute *old, Attribute *new, for ( o=0; old->a_vals[o].bv_val; o++ ) ; for ( n=0; new->a_vals[n].bv_val; n++ ) ; - /* there MUST be both onld and new values - * (otherwise j is used uninitialized) */ + /* there MUST be both old and new values */ assert( o != 0 ); assert( n != 0 ); + j = 0; adds = op->o_tmpalloc( sizeof(struct berval *) * n, op->o_tmpmemctx ); dels = op->o_tmpalloc( sizeof(struct berval *) * o, op->o_tmpmemctx ); -- GitLab