From 37f628a88d800123dbad003b122322e8181c3baa Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 17 Jul 2017 21:36:47 +0200 Subject: seq added to msg handler --- code/util/util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'code/util') diff --git a/code/util/util.c b/code/util/util.c index e07748b..af47079 100644 --- a/code/util/util.c +++ b/code/util/util.c @@ -9,7 +9,7 @@ int ecp_util_key_save(ECPContext *ctx, ECPDHKey *key, char *filename) { int fd; ssize_t rv; - if((fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) < 0) return ECP_ERR; + if ((fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) < 0) return ECP_ERR; rv = write(fd, ctx->cr.dh_pub_get_buf(&key->public), ECP_ECDH_SIZE_KEY); if (rv != ECP_ECDH_SIZE_KEY) { close(fd); @@ -29,7 +29,7 @@ int ecp_util_key_load(ECPContext *ctx, ECPDHKey *key, char *filename) { ssize_t rv; unsigned char buf[ECP_ECDH_SIZE_KEY]; - if((fd = open(filename, O_RDONLY)) < 0) return ECP_ERR; + if ((fd = open(filename, O_RDONLY)) < 0) return ECP_ERR; rv = read(fd, buf, ECP_ECDH_SIZE_KEY); if (rv != ECP_ECDH_SIZE_KEY) { close(fd); @@ -52,7 +52,7 @@ int ecp_util_node_save(ECPContext *ctx, ECPNode *node, char *filename) { int fd; ssize_t rv; - if((fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) < 0) return ECP_ERR; + if ((fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) < 0) return ECP_ERR; rv = write(fd, ctx->cr.dh_pub_get_buf(&node->public), ECP_ECDH_SIZE_KEY); if (rv != ECP_ECDH_SIZE_KEY) { close(fd); @@ -72,7 +72,7 @@ int ecp_util_node_load(ECPContext *ctx, ECPNode *node, char *filename) { ssize_t rv; unsigned char buf[ECP_ECDH_SIZE_KEY]; - if((fd = open(filename, O_RDONLY)) < 0) return ECP_ERR; + if ((fd = open(filename, O_RDONLY)) < 0) return ECP_ERR; rv = read(fd, buf, ECP_ECDH_SIZE_KEY); if (rv != ECP_ECDH_SIZE_KEY) { close(fd); -- cgit v1.2.3