Commit fcb90d51 authored by Lothar Rubusch's avatar Lothar Rubusch Committed by Herbert Xu

crypto: af_alg - bool type cosmetics

When working with bool values the true and false definitions should be used
instead of 1 and 0.

Hopefully I fixed my mailer and apologize for that.
Signed-off-by: default avatarLothar Rubusch <l.rubusch@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 6e4e00d8
...@@ -821,8 +821,8 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, ...@@ -821,8 +821,8 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
struct af_alg_tsgl *sgl; struct af_alg_tsgl *sgl;
struct af_alg_control con = {}; struct af_alg_control con = {};
long copied = 0; long copied = 0;
bool enc = 0; bool enc = false;
bool init = 0; bool init = false;
int err = 0; int err = 0;
if (msg->msg_controllen) { if (msg->msg_controllen) {
...@@ -830,13 +830,13 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, ...@@ -830,13 +830,13 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
if (err) if (err)
return err; return err;
init = 1; init = true;
switch (con.op) { switch (con.op) {
case ALG_OP_ENCRYPT: case ALG_OP_ENCRYPT:
enc = 1; enc = true;
break; break;
case ALG_OP_DECRYPT: case ALG_OP_DECRYPT:
enc = 0; enc = false;
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
...@@ -83,7 +83,7 @@ static int hash_sendmsg(struct socket *sock, struct msghdr *msg, ...@@ -83,7 +83,7 @@ static int hash_sendmsg(struct socket *sock, struct msghdr *msg,
goto unlock; goto unlock;
} }
ctx->more = 0; ctx->more = false;
while (msg_data_left(msg)) { while (msg_data_left(msg)) {
int len = msg_data_left(msg); int len = msg_data_left(msg);
...@@ -211,7 +211,7 @@ static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, ...@@ -211,7 +211,7 @@ static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
} }
if (!result || ctx->more) { if (!result || ctx->more) {
ctx->more = 0; ctx->more = false;
err = crypto_wait_req(crypto_ahash_final(&ctx->req), err = crypto_wait_req(crypto_ahash_final(&ctx->req),
&ctx->wait); &ctx->wait);
if (err) if (err)
...@@ -436,7 +436,7 @@ static int hash_accept_parent_nokey(void *private, struct sock *sk) ...@@ -436,7 +436,7 @@ static int hash_accept_parent_nokey(void *private, struct sock *sk)
ctx->result = NULL; ctx->result = NULL;
ctx->len = len; ctx->len = len;
ctx->more = 0; ctx->more = false;
crypto_init_wait(&ctx->wait); crypto_init_wait(&ctx->wait);
ask->private = ctx; ask->private = ctx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment