xiaoxiang781216 commented on code in PR #21106:
URL: https://github.com/apache/nuttx/pull/21106#discussion_r4415742478
##########
libs/libc/unistd/lib_crypt_r.c:
##########
@@ -71,67 +74,89 @@ static FAR char *md5_to64(FAR char *s, unsigned long v, int
n)
return s;
}
-static int md5_init(FAR cryptodev_context_t *ctx)
+/* A failed step keeps its error in ctx->error: the later steps do nothing,
+ * and md5_finish() returns the error after it closes the session.
+ */
+
+static void md5_init(FAR cryptodev_context_t *ctx)
{
- int ret;
int fd;
memset(ctx, 0, sizeof(cryptodev_context_t));
+ ctx->fd = -1;
Review Comment:
why not save into ctx->FD and remove line 83
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]