summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/util.rs b/src/util.rs
index 79b8c34..2542a7b 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -59,8 +59,7 @@ pub fn get_command_result(value: c_int) -> Result<(), Error> {
}
pub fn get_last_result() -> Result<(), Error> {
- let value = unsafe { nitrokey_sys::NK_get_last_command_status() } as c_int;
- get_command_result(value)
+ get_command_result(unsafe { nitrokey_sys::NK_get_last_command_status() }.into())
}
pub fn get_last_error() -> Error {