diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 13:52:01 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 17:38:03 +0530 |
commit | 9c490f66d98af0bdc96583f1cd438955708a5741 (patch) | |
tree | 4b76ef202dbd82eb1238c2387da4ad8a85007f7c /src/libnpass/libnpass.c | |
parent | 82542902de23f14ea5641e4199c0a43fee251525 (diff) |
c: declare local functions as static
Diffstat (limited to 'src/libnpass/libnpass.c')
-rw-r--r-- | src/libnpass/libnpass.c | 24 |
1 files changed, 12 insertions, 12 deletions
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; |