diff options
Diffstat (limited to 'usr.sbin/amd/amd/info_ndbm.c')
-rw-r--r-- | usr.sbin/amd/amd/info_ndbm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/amd/amd/info_ndbm.c b/usr.sbin/amd/amd/info_ndbm.c index ca5a6afb4f7..d13ea0a6d80 100644 --- a/usr.sbin/amd/amd/info_ndbm.c +++ b/usr.sbin/amd/amd/info_ndbm.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)info_ndbm.c 8.1 (Berkeley) 6/6/93 - * $Id: info_ndbm.c,v 1.2 2002/07/18 00:50:23 pvalchev Exp $ + * $Id: info_ndbm.c,v 1.3 2002/07/18 02:14:45 deraadt Exp $ */ /* @@ -51,9 +51,11 @@ #include <fcntl.h> #include <sys/stat.h> -static int search_ndbm(DBM *db, char *key, char **val) +static int +search_ndbm(DBM *db, char *key, char **val) { datum k, v; + k.dptr = key; k.dsize = strlen(key) + 1; v = dbm_fetch(db, k); @@ -64,7 +66,8 @@ static int search_ndbm(DBM *db, char *key, char **val) return ENOENT; } -int ndbm_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) +int +ndbm_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) { DBM *db; @@ -72,6 +75,7 @@ int ndbm_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) if (db) { struct stat stb; int error; + error = fstat(dbm_pagfno(db), &stb); if (!error && *tp < stb.st_mtime) { *tp = stb.st_mtime; @@ -86,7 +90,8 @@ int ndbm_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) return errno; } -int ndbm_init(char *map, time_t *tp) +int +ndbm_init(char *map, time_t *tp) { DBM *db; |