summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-05 18:05:11 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-08 04:52:26 +0200
commita11230422b13cea6ee34ffb81ff63deb6186628a (patch)
tree9a37e446ece2b9ebd7d1cbe45c0f1eaa05e659b2
parent72c849884e71ffc6732aecdaf889d22a4a464f28 (diff)
downloadcryptodev-linux-a11230422b13cea6ee34ffb81ff63deb6186628a.tar.gz
cryptodev-linux-a11230422b13cea6ee34ffb81ff63deb6186628a.tar.xz
cryptodev-linux-a11230422b13cea6ee34ffb81ff63deb6186628a.zip
Change NCR_{KEY,SESSION}_INVALID
We will be able allocate ID 0. Note that this is an ABI change.
-rw-r--r--ncr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ncr.h b/ncr.h
index 53c77be..b8ca98e 100644
--- a/ncr.h
+++ b/ncr.h
@@ -59,7 +59,7 @@ typedef enum {
typedef int ncr_key_t;
-#define NCR_KEY_INVALID (ncr_key_t)(0)
+#define NCR_KEY_INVALID ((ncr_key_t)-1)
#define NCR_KEY_FLAG_EXPORTABLE 1
#define NCR_KEY_FLAG_WRAPPABLE (1<<1)
@@ -249,7 +249,7 @@ typedef enum {
} ncr_crypto_op_t;
typedef int ncr_session_t;
-#define NCR_SESSION_INVALID (ncr_session_t)0
+#define NCR_SESSION_INVALID ((ncr_session_t)-1)
/* input of CIOCGSESSION */
struct ncr_session_st {