crypto/bn/asm/rsaz-x86_64.pl: make it work on Win64.
[openssl.git] / crypto / x509v3 / pcy_tree.c
index 6dcdf481d973d27fe6d9a30143014c786ab55e6e..47b1bf8f27163d5ce3aa279804d9da1755f14fb2 100644 (file)
@@ -132,7 +132,7 @@ static void tree_print(char *str, X509_POLICY_TREE *tree,
 #endif
 
 /* Initialize policy tree. Return values:
- *  0 Some internal error occured.
+ *  0 Some internal error occurred.
  * -1 Inconsistent or invalid extensions in certificates.
  *  1 Tree initialized OK.
  *  2 Policy tree is empty.
@@ -231,7 +231,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
        tree->auth_policies = NULL;
        tree->user_policies = NULL;
 
-       if (!tree)
+       if (!tree->levels)
                {
                OPENSSL_free(tree);
                return 0;
@@ -341,9 +341,8 @@ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
                                const X509_POLICY_CACHE *cache)
        {
        int i;
-       X509_POLICY_LEVEL *last;
        X509_POLICY_DATA *data;
-       last = curr - 1;
+
        for (i = 0; i < sk_X509_POLICY_DATA_num(cache->data); i++)
                {
                data = sk_X509_POLICY_DATA_value(cache->data, i);