]> git.sur5r.net Git - openldap/commitdiff
Don't do pointer arithmetic on void*
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 4 Jul 2005 05:18:01 +0000 (05:18 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 4 Jul 2005 05:18:01 +0000 (05:18 +0000)
servers/slapd/back-bdb/dn2id.c

index 2c2ef30e510644cf69f344d35a2e456f59292b56..89bfae0ebf311dbe778078d638d30d458f43b047 100644 (file)
@@ -670,7 +670,7 @@ hdb_dn2id(
                rc = DB_NOTFOUND;
        }
        if ( rc == 0 ) {
-               ptr = data.data + data.size - sizeof(ID);
+               ptr = (char *) data.data + data.size - sizeof(ID);
                BDB_DISK2ID( ptr, &ei->bei_id );
                ei->bei_rdn.bv_len = data.size - sizeof(diskNode) - nrlen;
                ptr = d->nrdn + nrlen + 1;
@@ -731,7 +731,7 @@ hdb_dn2id_parent(
                        rc = LDAP_OTHER;
                } else {
                        db_recno_t dkids;
-                       ptr = data.data + data.size - sizeof(ID);
+                       ptr = (char *) data.data + data.size - sizeof(ID);
                        BDB_DISK2ID( ptr, idp );
                        ei->bei_nrdn.bv_len = (d->nrdnlen[0] << 8) | d->nrdnlen[1];
                        ber_str2bv( d->nrdn, ei->bei_nrdn.bv_len, 1, &ei->bei_nrdn );