Fix 0 -> NULL, indentation
[openssl.git] / crypto / asn1 / a_int.c
index 833322e89bac145efda755566a75856734522965..c40c7faed2cf8f6c2d727d83cf2301f9b0f29a07 100644 (file)
@@ -289,7 +289,7 @@ static int asn1_get_int64(int64_t *pr, const unsigned char *b, size_t blen,
             ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_SMALL);
             return 0;
         }
-        *pr = -(uint64_t)r;
+        *pr = 0 - (uint64_t)r;
     } else {
         if (r > INT64_MAX) {
             ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_LARGE);
@@ -522,7 +522,7 @@ static BIGNUM *asn1_string_to_bn(const ASN1_INTEGER *ai, BIGNUM *bn,
     }
 
     ret = BN_bin2bn(ai->data, ai->length, bn);
-    if (ret == 0) {
+    if (ret == NULL) {
         ASN1err(ASN1_F_ASN1_STRING_TO_BN, ASN1_R_BN_LIB);
         return NULL;
     }