aboutsummaryrefslogtreecommitdiff
path: root/src/libnpass
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-04-17 12:19:33 +0530
committersinanmohd <sinan@sinanmohd.com>2024-04-17 12:30:55 +0530
commit091ecbe6f0572935d94752ae28823ad2a3eadd39 (patch)
treeab4f41c54b70785df11fd85995ed718d527b5530 /src/libnpass
parent47166b41e05090c595de633c67dfe8ae4cb19bc0 (diff)
c: improve error reporting
Diffstat (limited to 'src/libnpass')
-rw-r--r--src/libnpass/libnpass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnpass/libnpass.c b/src/libnpass/libnpass.c
index fd6e447..62cbc5e 100644
--- a/src/libnpass/libnpass.c
+++ b/src/libnpass/libnpass.c
@@ -163,7 +163,7 @@ static int openstore(const char *spath, DIR **dirp)
store_type = pass_store_type(spath);
if (store_type != PASS_STORE_DIR)
- return_err(-EINVAL, "%s Not a passwordstore path", spath);
+ return (store_type < 0) ? store_type : -EINVAL;
if (spath) {
r = snprintf(abs_path, sizeof(abs_path), "%s/%s", pass_dir,