mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-25 03:38:22 +08:00
Add functions for initializing empty crypto backend handles
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
9290ea974e
commit
aa61bc4942
@@ -37,6 +37,5 @@ typedef struct {
|
||||
int handle;
|
||||
} keystore_session_handle_t;
|
||||
|
||||
/* For the stub_keystore the handle is not used at the moment, so it is always valid */
|
||||
|
||||
inline bool keystore_session_handle_valid(keystore_session_handle_t handle) {return handle.handle > 0;}
|
||||
static inline void keystore_session_handle_init(keystore_session_handle_t *handle) {handle->handle = 0;}
|
||||
static inline bool keystore_session_handle_valid(keystore_session_handle_t handle) {return handle.handle > 0;}
|
||||
|
||||
@@ -43,4 +43,5 @@ typedef struct {
|
||||
keystore_session_handle_t keystore_handle;
|
||||
} crypto_session_handle_t;
|
||||
|
||||
static inline void crypto_session_handle_init(crypto_session_handle_t *handle) {handle->handle = 0;}
|
||||
static inline bool crypto_session_handle_valid(crypto_session_handle_t handle) {return handle.handle > 0;}
|
||||
|
||||
Reference in New Issue
Block a user