Skip to content

Commit 632152a

Browse files
committed
move declaration of crit_name and crit_len to top of function
1 parent 21919fb commit 632152a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/openssl/openssl.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,8 @@ PHP_FUNCTION(openssl_x509_parse)
10141014
char *str_serial;
10151015
char *hex_serial;
10161016
char buf[256];
1017+
char *crit_name = NULL;
1018+
int crit_len = 0;
10171019

10181020
ZEND_PARSE_PARAMETERS_START(1, 2)
10191021
Z_PARAM_OBJ_OF_CLASS_OR_STR(cert_obj, php_openssl_certificate_ce, cert_str)
@@ -1116,9 +1118,6 @@ PHP_FUNCTION(openssl_x509_parse)
11161118

11171119
array_init(&subitem);
11181120

1119-
char *crit_name = NULL;
1120-
int crit_len = 0;
1121-
11221121
for (i = 0; i < X509_get_ext_count(cert); i++) {
11231122
int nid;
11241123
extension = X509_get_ext(cert, i);

0 commit comments

Comments
 (0)