aboutsummaryrefslogtreecommitdiff
path: root/tests/pws.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pws.rs')
-rw-r--r--tests/pws.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/pws.rs b/tests/pws.rs
index 7169695..47e9703 100644
--- a/tests/pws.rs
+++ b/tests/pws.rs
@@ -16,7 +16,7 @@ use nitrokey_test::test as test_device;
fn get_slot_name_direct(slot: u8) -> Result<String, Error> {
let ptr = unsafe { nitrokey_sys::NK_get_password_safe_slot_name(slot) };
if ptr.is_null() {
- return Err(Error::UnexpectedError);
+ return Err(Error::UnexpectedError("null pointer".to_owned()));
}
let s = unsafe { CStr::from_ptr(ptr).to_string_lossy().into_owned() };
unsafe { free(ptr as *mut c_void) };