@@ -181,9 +181,9 @@ static int _getCryptoResponse(uint8_t* respBuf, uint16_t type,
181181
182182 return header -> rc ;
183183}
184- static int _SendRecieveWithTimeout (whClientContext * ctx ,
185- uint16_t * group , uint16_t * action , uint16_t req_len ,
186- uint16_t * res_len , void * data )
184+ static int _SendRecieveWithTimeout (whClientContext * ctx , uint16_t * group ,
185+ uint16_t * action , uint16_t req_len ,
186+ uint16_t * res_len , void * data )
187187{
188188
189189 int ret = WH_ERROR_OK ;
@@ -203,7 +203,8 @@ static int _SendRecieveWithTimeout(whClientContext *ctx,
203203 int chk = wh_Client_TimeoutCheck (ctx );
204204 if (chk == WH_ERROR_TIMEOUT ) {
205205 return WH_ERROR_TIMEOUT ;
206- } else if (chk < 0 && chk != WH_ERROR_OK ) {
206+ }
207+ else if (chk < 0 && chk != WH_ERROR_OK ) {
207208 return chk ;
208209 }
209210 }
@@ -263,8 +264,8 @@ int wh_Client_RngGenerate(whClientContext* ctx, uint8_t* out, uint32_t size)
263264 /* Send request and get response with Timeout */
264265 if (ret == 0 ) {
265266 do {
266- ret = _SendRecieveWithTimeout (ctx , & group , & action ,
267- req_len , & res_len , dataPtr );
267+ ret = _SendRecieveWithTimeout (ctx , & group , & action , req_len ,
268+ & res_len , dataPtr );
268269 } while (ret == WH_ERROR_NOTREADY );
269270 }
270271 if (ret == WH_ERROR_OK ) {
@@ -444,9 +445,8 @@ int wh_Client_AesCtr(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
444445 /* Response packet */
445446 uint16_t res_len = 0 ;
446447 do {
447- ret =
448- _SendRecieveWithTimeout (ctx , & group , & action ,
449- req_len , & res_len , dataPtr );
448+ ret = _SendRecieveWithTimeout (ctx , & group , & action , req_len ,
449+ & res_len , dataPtr );
450450 } while (ret == WH_ERROR_NOTREADY );
451451
452452 if (ret == WH_ERROR_OK ) {
@@ -558,9 +558,8 @@ int wh_Client_AesEcb(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
558558 /* Response packet */
559559 uint16_t res_len = 0 ;
560560 do {
561- ret =
562- _SendRecieveWithTimeout (ctx , & group , & action ,
563- req_len , & res_len , dataPtr );
561+ ret = _SendRecieveWithTimeout (ctx , & group , & action , req_len ,
562+ & res_len , dataPtr );
564563 } while (ret == WH_ERROR_NOTREADY );
565564
566565 if (ret == WH_ERROR_OK ) {
@@ -668,9 +667,8 @@ int wh_Client_AesCbc(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
668667 /* Response packet */
669668 uint16_t res_len = 0 ;
670669 do {
671- ret =
672- _SendRecieveWithTimeout (ctx , & group , & action ,
673- req_len , & res_len , dataPtr );
670+ ret = _SendRecieveWithTimeout (ctx , & group , & action , req_len ,
671+ & res_len , dataPtr );
674672 } while (ret == WH_ERROR_NOTREADY );
675673
676674 if (ret == WH_ERROR_OK ) {
@@ -790,9 +788,8 @@ int wh_Client_AesGcm(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
790788 if (ret == 0 ) {
791789 uint16_t res_len = 0 ;
792790 do {
793- ret =
794- _SendRecieveWithTimeout (ctx , & group , & action ,
795- req_len , & res_len , dataPtr );
791+ ret = _SendRecieveWithTimeout (ctx , & group , & action , req_len ,
792+ & res_len , dataPtr );
796793 } while (ret == WH_ERROR_NOTREADY );
797794
798795 if (ret == WH_ERROR_OK ) {
@@ -989,9 +986,8 @@ int wh_Client_AesGcmDma(whClientContext* ctx, Aes* aes, int enc,
989986 if (ret == 0 ) {
990987 uint16_t resLen = 0 ;
991988 do {
992- ret =
993- _SendRecieveWithTimeout (ctx , & group , & action ,
994- reqLen , & resLen , dataPtr );
989+ ret = _SendRecieveWithTimeout (ctx , & group , & action , reqLen , & resLen ,
990+ dataPtr );
995991 } while (ret == WH_ERROR_NOTREADY );
996992
997993 if (ret == WH_ERROR_OK ) {
0 commit comments