diff options
author | 2013-12-21 20:46:20 +0000 | |
---|---|---|
committer | 2013-12-21 20:46:20 +0000 | |
commit | e5ce13e202d6397af800750d5cde9ddc18f5fc25 (patch) | |
tree | 935f0e48006ff8e067f1122a9fb843e6680e6371 | |
parent | Advertise that we provide monotonic timestamps. (diff) | |
download | wireguard-openbsd-e5ce13e202d6397af800750d5cde9ddc18f5fc25.tar.xz wireguard-openbsd-e5ce13e202d6397af800750d5cde9ddc18f5fc25.zip |
Don't assign a literal number to a variable that otherwise holds an errno.
ok jsing@
-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 |