From f7ec966aade7d501ccd16c4939bf24ae1af7d969 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 6 Dec 2007 16:54:47 +0000 Subject: [PATCH] Cleanup dup_compare --- servers/slapd/back-bdb/dn2id.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index bddbe79283..d4462365ce 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -468,11 +468,11 @@ hdb_dup_compare( cn = (diskNode *)curkey->data; /* data is not aligned, cannot compare directly */ - ul = un->nrdnlen[0] << 8 | un->nrdnlen[1]; - cl = cn->nrdnlen[0] << 8 | cn->nrdnlen[1]; + rc = un->nrdnlen[0] - cn->nrdnlen[0]; + if ( rc ) return rc; + rc = un->nrdnlen[1] - cn->nrdnlen[1]; + if ( rc ) return rc; - rc = ul - cl; - if( rc ) return rc; return strcmp( un->nrdn, cn->nrdn ); } -- 2.39.5