diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-12-21 20:46:21 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-12-21 20:46:21 +0000 |
commit | 5b749b0ae6b4c6ba066887f3b13fbb50605689b1 (patch) | |
tree | fe69a0c2d69e4b26cce888bcb652641b9c484d74 /sys/dev | |
parent | 83aaa9d3e884a3ccc658c47eae40804c7ff81b7d (diff) |
Don't assign a literal number to a variable that otherwise holds an errno.
ok jsing@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/softraid_crypto.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c index fa62a817e81..2662fc1c4e6 100644 --- a/sys/dev/softraid_crypto.c +++ b/sys/dev/softraid_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_crypto.c,v 1.97 2013/11/19 15:12:13 krw Exp $ */ +/* $OpenBSD: softraid_crypto.c,v 1.98 2013/12/21 20:46:20 guenther Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org> @@ -1175,9 +1175,8 @@ sr_crypto_rw(struct sr_workunit *wu) return (1); crwu->cr_crp->crp_callback = sr_crypto_write; s = splvm(); - if (crypto_invoke(crwu->cr_crp)) - rv = 1; - else + rv = crypto_invoke(crwu->cr_crp); + if (rv == 0) rv = crwu->cr_crp->crp_etype; splx(s); } else |