if (out == NULL || *out == NULL) {
if ((ret = ASN1_GENERALIZEDTIME_new()) == NULL)
goto err;
- } else
+ } else {
ret = *out;
+ }
/* If already GeneralizedTime just copy across */
if (t->type == V_ASN1_GENERALIZEDTIME) {
return 0;
}
- if (s && !ASN1_STRING_copy((ASN1_STRING *)s, (ASN1_STRING *)&t))
+ if (s != NULL && !ASN1_STRING_copy((ASN1_STRING *)s, (ASN1_STRING *)&t))
return 0;
return 1;
time(&now_t);
memset(tm, 0, sizeof(*tm));
- if (OPENSSL_gmtime(&now_t, tm))
+ if (OPENSSL_gmtime(&now_t, tm) != NULL)
return 1;
return 0;
}
if (tm->type == V_ASN1_GENERALIZEDTIME)
return ASN1_GENERALIZEDTIME_print(bp, tm);
BIO_write(bp, "Bad time value", 14);
- return (0);
+ return 0;
}