summaryrefslogtreecommitdiff
path: root/net/bluetooth/ecdh_helper.h
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2017-09-28 17:14:52 +0300
committerMarcel Holtmann <marcel@holtmann.org>2017-10-06 20:35:47 +0200
commita297641610963bbb238ea77b32a2e958c4f7b184 (patch)
tree6a2146816ab8ceeeb884efb835491614961370f4 /net/bluetooth/ecdh_helper.h
parent47eb2ac809189e0a60ad78eec6db9e84004e11be (diff)
Bluetooth: ecdh_helper - reveal error codes
ecdh_helper functions were hiding the error codes and chose to return the return value of an relational operator, "==". Remove the unnecessary query and reveal the error codes. While updating the return values, code in a way that compilers will warn in case of uninitialized err. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/ecdh_helper.h')
-rw-r--r--net/bluetooth/ecdh_helper.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/ecdh_helper.h b/net/bluetooth/ecdh_helper.h
index 5cde37d12fd9..50e6676aebf5 100644
--- a/net/bluetooth/ecdh_helper.h
+++ b/net/bluetooth/ecdh_helper.h
@@ -23,7 +23,7 @@
#include <crypto/kpp.h>
#include <linux/types.h>
-bool compute_ecdh_secret(struct crypto_kpp *tfm, const u8 pub_a[64],
- const u8 priv_b[32], u8 secret[32]);
-bool generate_ecdh_keys(struct crypto_kpp *tfm, u8 public_key[64],
- u8 private_key[32]);
+int compute_ecdh_secret(struct crypto_kpp *tfm, const u8 pub_a[64],
+ const u8 priv_b[32], u8 secret[32]);
+int generate_ecdh_keys(struct crypto_kpp *tfm, u8 public_key[64],
+ u8 private_key[32]);