[Date Prev][Date Next] [Chronological] [Thread] [Top]

HEAD with SLAPD_CRYPT fails to compile (ITS#2993)



Full_Name: Luca Scamoni
Version: HEAD
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.227.212.131)


In libraries/liblutil/passwd.c pw is defined as struct, not struct * and so the
-> should be substituted by .

Index: passwd.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/liblutil/passwd.c,v
retrieving revision 1.87
diff -u -b -r1.87 passwd.c
--- passwd.c    2 Mar 2004 20:59:24 -0000       1.87
+++ passwd.c    3 Mar 2004 14:18:09 -0000
@@ -373,10 +373,10 @@
 {
        struct berval pw;

-       pw->bv_len = sc->bv_len + passwd->bv_len;
-       pw->bv_val = ber_memalloc( pw->bv_len + 1 );
+       pw.bv_len = sc->bv_len + passwd->bv_len;
+       pw.bv_val = ber_memalloc( pw.bv_len + 1 );

-       if( pw->bv_val == NULL ) {
+       if( pw.bv_val == NULL ) {
                return -1;
        }

gcc-3.3 also complains about the assignment (line 387) *passwd=pw trying to
write to a read-only memory location (since *passwd is declared const)