提交 1f06acc0 编写于 作者: P Pauli

Change return (x) to return x

Reviewed-by: NAndy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3912)
上级 a9a157e7
......@@ -23,12 +23,12 @@ static int _asn1_check_infinite_end(const unsigned char **p, long len)
* If there is 0 or 1 byte left, the length check should pick things up
*/
if (len <= 0)
return (1);
return 1;
else if ((len >= 2) && ((*p)[0] == 0) && ((*p)[1] == 0)) {
(*p) += 2;
return (1);
return 1;
}
return (0);
return 0;
}
int ASN1_check_infinite_end(unsigned char **p, long len)
......@@ -96,10 +96,10 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
ret |= 0x80;
}
*pp = p;
return (ret | inf);
return ret | inf;
err:
ASN1err(ASN1_F_ASN1_GET_OBJECT, ASN1_R_HEADER_TOO_LONG);
return (0x80);
return 0x80;
}
/*
......@@ -275,7 +275,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
if (len < 0) {
if (data == NULL)
return (0);
return 0;
else
len = strlen(data);
}
......@@ -285,7 +285,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
if (str->data == NULL) {
ASN1err(ASN1_F_ASN1_STRING_SET, ERR_R_MALLOC_FAILURE);
str->data = c;
return (0);
return 0;
}
}
str->length = len;
......@@ -294,7 +294,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
/* an allowance for strings :-) */
str->data[len] = '\0';
}
return (1);
return 1;
}
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len)
......@@ -306,7 +306,7 @@ void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len)
ASN1_STRING *ASN1_STRING_new(void)
{
return (ASN1_STRING_type_new(V_ASN1_OCTET_STRING));
return ASN1_STRING_type_new(V_ASN1_OCTET_STRING);
}
ASN1_STRING *ASN1_STRING_type_new(int type)
......@@ -316,10 +316,10 @@ ASN1_STRING *ASN1_STRING_type_new(int type)
ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW, ERR_R_MALLOC_FAILURE);
return (NULL);
return NULL;
}
ret->type = type;
return (ret);
return ret;
}
void asn1_string_embed_free(ASN1_STRING *a, int embed)
......@@ -356,11 +356,11 @@ int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b)
if (i == 0) {
i = memcmp(a->data, b->data, a->length);
if (i == 0)
return (a->type - b->type);
return a->type - b->type;
else
return (i);
return i;
} else
return (i);
return i;
}
int ASN1_STRING_length(const ASN1_STRING *x)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册