Fix a couple of minor compiler warnings.
One about a possible uninitialised variable (incorrect, but it's easier to keep the compiler happy) and one warning about "const static" being backwards. Change-Id: Ic5976a5f0b48f32e09682e31b65d8ea1c27e5b88 Reviewed-on: https://boringssl-review.googlesource.com/2632 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
a7f6d3c1dc
commit
b9e0ccc650
@ -1900,7 +1900,7 @@ ASN1_TIME *X509_time_adj(ASN1_TIME *s, long offset_sec, time_t *in_tm)
|
|||||||
ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
|
ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
|
||||||
int offset_day, long offset_sec, time_t *in_tm)
|
int offset_day, long offset_sec, time_t *in_tm)
|
||||||
{
|
{
|
||||||
time_t t;
|
time_t t = 0;
|
||||||
|
|
||||||
if (in_tm) t = *in_tm;
|
if (in_tm) t = *in_tm;
|
||||||
else time(&t);
|
else time(&t);
|
||||||
|
@ -370,7 +370,7 @@ char *hex_to_string(const unsigned char *buffer, long len)
|
|||||||
char *tmp, *q;
|
char *tmp, *q;
|
||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
int i;
|
int i;
|
||||||
const static char hexdig[] = "0123456789ABCDEF";
|
static const char hexdig[] = "0123456789ABCDEF";
|
||||||
if(!buffer || !len) return NULL;
|
if(!buffer || !len) return NULL;
|
||||||
if(!(tmp = OPENSSL_malloc(len * 3 + 1))) {
|
if(!(tmp = OPENSSL_malloc(len * 3 + 1))) {
|
||||||
OPENSSL_PUT_ERROR(X509V3, hex_to_string, ERR_R_MALLOC_FAILURE);
|
OPENSSL_PUT_ERROR(X509V3, hex_to_string, ERR_R_MALLOC_FAILURE);
|
||||||
|
Loading…
Reference in New Issue
Block a user