Fix loads of warnings in policy code.
[oweals/openssl.git] / crypto / x509v3 / pcy_tree.c
index 16cacde0c4cbdfdf9932842c2d641fc648cdbd8f..9ac169c00cfba42fe242d314fd78f2f56102f755 100644 (file)
@@ -81,11 +81,11 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
        X509 *x;
        int ret = 1;
        int i, n;
-       *ptree = NULL;
-       n = sk_X509_num(certs);
        int explicit_policy;
        int any_skip;
        int map_skip;
+       *ptree = NULL;
+       n = sk_X509_num(certs);
 
        /* Disable policy mapping for now... */
        flags |= X509_V_FLAG_INHIBIT_MAP;
@@ -410,11 +410,11 @@ static int tree_add_auth_node(STACK_OF(X509_POLICY_NODE) **pnodes,
  */
 
 static int tree_calculate_authority_set(X509_POLICY_TREE *tree,
-                                       STACK_OF(X509_POLICY_NODES) **pnodes)
+                                       STACK_OF(X509_POLICY_NODE) **pnodes)
        {
        X509_POLICY_LEVEL *curr;
        X509_POLICY_NODE *node, *anyptr;
-       STACK_OF(X509_POLICY_NODES) **addnodes;
+       STACK_OF(X509_POLICY_NODE) **addnodes;
        int i, j;
        curr = tree->levels + tree->nlevel - 1;
 
@@ -596,7 +596,7 @@ int X509_policy_check(X509_POLICY_TREE **ptree, int *explicit,
        {
        int ret;
        X509_POLICY_TREE *tree = NULL;
-       STACK_OF(X509_NODE) *nodes, *auth_nodes = NULL;
+       STACK_OF(X509_POLICY_NODE) *nodes, *auth_nodes = NULL;
        *ptree = NULL;
 
        *explicit = 0;