Code optimization and style fixes
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c
index 8baca81..2f7126b 100644
--- a/programs/x509/cert_req.c
+++ b/programs/x509/cert_req.c
@@ -169,7 +169,6 @@
mbedtls_ctr_drbg_context ctr_drbg;
const char *pers = "csr example app";
mbedtls_x509_san_list *cur, *prev;
- uint8_t ip[4];
/*
* Set to sane values
@@ -220,6 +219,8 @@
prev = NULL;
while (q != NULL) {
+ uint8_t ip[4] = { 0 };
+
if ((r = strchr(q, ';')) != NULL) {
*r++ = '\0';
}