diff options
Diffstat (limited to 'src/libnpass')
-rw-r--r-- | src/libnpass/gpg.c | 8 | ||||
-rw-r--r-- | src/libnpass/libnpass.c | 24 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/libnpass/gpg.c b/src/libnpass/gpg.c index 9e3bb7a..f193363 100644 --- a/src/libnpass/gpg.c +++ b/src/libnpass/gpg.c @@ -18,10 +18,10 @@ static gpgme_ctx_t ctx = NULL; static gpgme_key_t key = NULL; -int gpg_init(void); -void gpg_cleanup(void); +static int gpg_init(void); +static void gpg_cleanup(void); -int gpg_init(void) +static int gpg_init(void) { gpgme_error_t err; const char *local = setlocale(LC_ALL, ""); @@ -40,7 +40,7 @@ int gpg_init(void) return 0; } -void gpg_cleanup(void) +static void gpg_cleanup(void) { if (ctx) gpgme_key_release(key); diff --git a/src/libnpass/libnpass.c b/src/libnpass/libnpass.c index 6e4c874..bc1d774 100644 --- a/src/libnpass/libnpass.c +++ b/src/libnpass/libnpass.c @@ -33,10 +33,10 @@ const char *pass_gen_set[] = { "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", }; -int set_pass_dir(void); -int is_storeobj(struct dirent *dir); +static int set_pass_dir(void); +static int is_storeobj(struct dirent *dir); -int set_pass_dir(void) { +static int set_pass_dir(void) { const char *env; env = getenv("PASSWORD_STORE_DIR"); @@ -62,15 +62,7 @@ int set_pass_dir(void) { return 1; } -int pass_store_cmp(const void *vp1, const void *vp2) { - struct store *sp1, *sp2; - - sp1 = (struct store *) vp1; - sp2 = (struct store *) vp2; - return strcmp(sp1->name, sp2->name); -} - -int is_storeobj(struct dirent *dir) { +static int is_storeobj(struct dirent *dir) { int r; char *s; @@ -96,6 +88,14 @@ int is_storeobj(struct dirent *dir) { } } +int pass_store_cmp(const void *vp1, const void *vp2) { + struct store *sp1, *sp2; + + sp1 = (struct store *) vp1; + sp2 = (struct store *) vp2; + return strcmp(sp1->name, sp2->name); +} + pass_store_t pass_store_type(const char *spath) { int r; struct stat sbuf; |