r23488: hdb_openp has changed from void * to int...
authorStefan Metzmacher <metze@samba.org>
Thu, 14 Jun 2007 12:19:53 +0000 (12:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:53:19 +0000 (14:53 -0500)
lha: what is the reason for this? it's really bad to use
     an int for storing a pointer value...

metze

source/kdc/hdb-ldb.c

index 11ae2a0064ebd3d7415b7183c580a45664991398..b80d9f3bcec2b1551d1c92af08367390d3853808 100644 (file)
@@ -1015,7 +1015,7 @@ static krb5_error_code LDB_seq(krb5_context context, HDB *db, unsigned flags, hd
 
        if (ret != 0) {
                talloc_free(priv);
-               db->hdb_openp = NULL;
+               db->hdb_openp = 0;
        } else {
                talloc_free(mem_ctx);
        }
@@ -1094,13 +1094,14 @@ static krb5_error_code LDB_firstkey(krb5_context context, HDB *db, unsigned flag
        priv->msgs = talloc_steal(priv, res->msgs);
        talloc_free(res);
 
-       db->hdb_openp = priv;
+       /* why has hdb_openp changed from (void *) to (int) ??? */
+       db->hdb_openp = (int)priv;
 
        ret = LDB_seq(context, db, flags, entry);
-       
+
        if (ret != 0) {
                talloc_free(priv);
-               db->hdb_openp = NULL;
+               db->hdb_openp = 0;
        } else {
                talloc_free(mem_ctx);
        }