diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2015-09-20 20:55:00 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2015-09-20 20:55:00 +0000 |
commit | 70a6c8c8928ba9597150fb86457416e600ed71f8 (patch) | |
tree | 38fa81a8671f14aac438ef6d182884acc81906ca /lib/libc/db | |
parent | 0cbe54eb2d532422d2e3414903a4d71a98fc23a6 (diff) | |
download | FreeBSD-src-70a6c8c8928ba9597150fb86457416e600ed71f8.zip FreeBSD-src-70a6c8c8928ba9597150fb86457416e600ed71f8.tar.gz |
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
Diffstat (limited to 'lib/libc/db')
-rw-r--r-- | lib/libc/db/hash/ndbm.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/lib/libc/db/hash/ndbm.c b/lib/libc/db/hash/ndbm.c index 42ffb1b..37adaf6 100644 --- a/lib/libc/db/hash/ndbm.c +++ b/lib/libc/db/hash/ndbm.c @@ -56,9 +56,7 @@ __FBSDID("$FreeBSD$"); * NULL on failure */ extern DBM * -dbm_open(file, flags, mode) - const char *file; - int flags, mode; +dbm_open(const char *file, int flags, int mode) { HASHINFO info; char path[MAXPATHLEN]; @@ -80,8 +78,7 @@ dbm_open(file, flags, mode) } extern void -dbm_close(db) - DBM *db; +dbm_close(DBM *db) { (void)(db->close)(db); } @@ -92,9 +89,7 @@ dbm_close(db) * NULL on failure */ extern datum -dbm_fetch(db, key) - DBM *db; - datum key; +dbm_fetch(DBM *db, datum key) { datum retdata; int status; @@ -118,8 +113,7 @@ dbm_fetch(db, key) * NULL on failure */ extern datum -dbm_firstkey(db) - DBM *db; +dbm_firstkey(DBM *db) { int status; datum retkey; @@ -139,8 +133,7 @@ dbm_firstkey(db) * NULL on failure */ extern datum -dbm_nextkey(db) - DBM *db; +dbm_nextkey(DBM *db) { int status; datum retkey; @@ -160,9 +153,7 @@ dbm_nextkey(db) * <0 failure */ extern int -dbm_delete(db, key) - DBM *db; - datum key; +dbm_delete(DBM *db, datum key) { int status; DBT dbtkey; @@ -183,10 +174,7 @@ dbm_delete(db, key) * 1 if DBM_INSERT and entry exists */ extern int -dbm_store(db, key, data, flags) - DBM *db; - datum key, data; - int flags; +dbm_store(DBM *db, datum key, datum data, int flags) { DBT dbtkey, dbtdata; @@ -199,8 +187,7 @@ dbm_store(db, key, data, flags) } extern int -dbm_error(db) - DBM *db; +dbm_error(DBM *db) { HTAB *hp; @@ -209,8 +196,7 @@ dbm_error(db) } extern int -dbm_clearerr(db) - DBM *db; +dbm_clearerr(DBM *db) { HTAB *hp; @@ -220,8 +206,7 @@ dbm_clearerr(db) } extern int -dbm_dirfno(db) - DBM *db; +dbm_dirfno(DBM *db) { return(((HTAB *)db->internal)->fp); } |