svn commit: r288042 - head/lib/libc/db/hash
Craig Rodrigues
rodrigc at FreeBSD.org
Sun Sep 20 20:55:01 UTC 2015
Author: rodrigc
Date: Sun Sep 20 20:55:00 2015
New Revision: 288042
URL: https://svnweb.freebsd.org/changeset/base/288042
Log:
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
Modified:
head/lib/libc/db/hash/ndbm.c
Modified: head/lib/libc/db/hash/ndbm.c
==============================================================================
--- head/lib/libc/db/hash/ndbm.c Sun Sep 20 20:53:24 2015 (r288041)
+++ head/lib/libc/db/hash/ndbm.c Sun Sep 20 20:55:00 2015 (r288042)
@@ -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);
}
More information about the svn-src-head
mailing list