From 12949734bde5b74cc5e85d027a9b2791f8b2876f Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 15 Apr 2004 02:36:23 +0000 Subject: [PATCH] Fix warning in assignment --- servers/slapd/back-ldap/modify.c | 8 ++++---- servers/slapd/back-meta/modify.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/servers/slapd/back-ldap/modify.c b/servers/slapd/back-ldap/modify.c index 95247cbeef..8b26ff3fd8 100644 --- a/servers/slapd/back-ldap/modify.c +++ b/servers/slapd/back-ldap/modify.c @@ -120,7 +120,7 @@ ldap_back_modify( if ( ml->sml_values != NULL ) { if ( is_oc ) { for (j = 0; ml->sml_values[j].bv_val; j++); - mods[i].mod_values = (struct berval **)ch_malloc((j+1) * + mods[i].mod_bvalues = (struct berval **)ch_malloc((j+1) * sizeof(struct berval *)); for (j = 0; ml->sml_values[j].bv_val; j++) { ldap_back_map(&li->rwmap.rwm_oc, @@ -129,7 +129,7 @@ ldap_back_modify( if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0') { continue; } - mods[i].mod_values[j] = &mapped; + mods[i].mod_bvalues[j] = &mapped; } mods[i].mod_values[j] = NULL; @@ -144,10 +144,10 @@ ldap_back_modify( } for (j = 0; ml->sml_values[j].bv_val; j++); - mods[i].mod_values = (struct berval **)ch_malloc((j+1) * + mods[i].mod_bvalues = (struct berval **)ch_malloc((j+1) * sizeof(struct berval *)); for (j = 0; ml->sml_values[j].bv_val; j++) - mods[i].mod_values[j] = &ml->sml_values[j]; + mods[i].mod_bvalues[j] = &ml->sml_values[j]; mods[i].mod_values[j] = NULL; } diff --git a/servers/slapd/back-meta/modify.c b/servers/slapd/back-meta/modify.c index 8fbee1407e..390dadd640 100644 --- a/servers/slapd/back-meta/modify.c +++ b/servers/slapd/back-meta/modify.c @@ -119,14 +119,14 @@ meta_back_modify( Operation *op, SlapReply *rs ) if ( ml->sml_values != NULL ){ for (j = 0; ml->sml_values[ j ].bv_val; j++); - mods[ i ].mod_values = (struct berval **)ch_malloc((j+1) * + mods[ i ].mod_bvalues = (struct berval **)ch_malloc((j+1) * sizeof(struct berval *)); for (j = 0; ml->sml_values[ j ].bv_val; j++) - mods[ i ].mod_values[ j ] = &ml->sml_values[j]; - mods[ i ].mod_values[ j ] = NULL; + mods[ i ].mod_bvalues[ j ] = &ml->sml_values[j]; + mods[ i ].mod_bvalues[ j ] = NULL; } else { - mods[ i ].mod_values = NULL; + mods[ i ].mod_bvalues = NULL; } i++; -- 2.39.5