diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-16 21:11:07 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-16 21:11:10 +0530 |
commit | cf70ac8af421dd9f1a53d9e5dbf89b976b02290b (patch) | |
tree | 74a5108791690ded174d11d6c827710bd50b3658 /include/libnpass | |
parent | 7e7f2da14ad9ec9b1cabe3061147300fcdf93039 (diff) |
libnpass: refactor
https://www.kernel.org/doc/html/v4.10/process/coding-style.html
- Function return values and names
(-Exxx = failure, 0 = success) for imperative commands
(0 = failure, non-zero = success) for predicates
Diffstat (limited to 'include/libnpass')
-rw-r--r-- | include/libnpass/libnpass.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/libnpass/libnpass.h b/include/libnpass/libnpass.h index d82de9c..186b907 100644 --- a/include/libnpass/libnpass.h +++ b/include/libnpass/libnpass.h @@ -21,11 +21,8 @@ struct store { pass_store_t type; }; -DIR *openstore(const char *spath); -int readstore(DIR *dirp, struct store *s); int readstore_all(const char *path, struct store **stor); - -pass_store_t pass_store_type(const char *spath); +int pass_store_type(const char *spath); int pass_store_cmp(const void *vp1, const void *vp2); int pass_init(const char *fpr); @@ -34,4 +31,4 @@ int pass_add(const char *path, const char *pass, size_t n); int pass_rm(const char *path); ssize_t pass_getpass(char **lineptr, size_t *n, FILE *stream); -int pass_gen(pass_gen_t gen, char *pass, size_t n); +int pass_gen(pass_gen_t gen, char *pass, int len); |