From cdaa2560c0271585317450b57047a7f812d8366e Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sat, 28 Aug 2021 02:58:35 +0200 Subject: code cleanup --- ecp/test/init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ecp/test/init.c') diff --git a/ecp/test/init.c b/ecp/test/init.c index 7e39f87..4dff693 100644 --- a/ecp/test/init.c +++ b/ecp/test/init.c @@ -6,7 +6,7 @@ static int v_rng(void *buf, size_t bufsize) { int fd; - + if((fd = open("/dev/urandom", O_RDONLY)) < 0) return -1; size_t nb = read(fd, buf, bufsize); close(fd); @@ -24,13 +24,13 @@ static void conn_free(ECPConnection *conn) { int ecp_init(ECPContext *ctx) { int rv; - - rv = ecp_ctx_create(ctx); + + rv = ecp_ctx_init(ctx); if (rv) return rv; - + ctx->rng = v_rng; ctx->conn_alloc = conn_alloc; ctx->conn_free = conn_free; - + return ECP_OK; } \ No newline at end of file -- cgit v1.2.3