summaryrefslogtreecommitdiff
path: root/lib/libc/db
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2004-06-21 23:13:23 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2004-06-21 23:13:23 +0000
commitc35a3cc1f50889911a74c83ea50c365a41f09b11 (patch)
tree426aac5f38672d4e7b381e48f0a0e139a643d0ea /lib/libc/db
parent092e26c18808a020b0e015fc72f6f85e0c3ad270 (diff)
another errno -> err in a structure. OK deraadt@
Diffstat (limited to 'lib/libc/db')
-rw-r--r--lib/libc/db/hash/hash.c18
-rw-r--r--lib/libc/db/hash/hash.h4
-rw-r--r--lib/libc/db/hash/ndbm.c8
3 files changed, 15 insertions, 15 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 12293646622..a7c81a35f0f 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hash.c,v 1.16 2003/06/02 20:18:33 millert Exp $ */
+/* $OpenBSD: hash.c,v 1.17 2004/06/21 23:13:22 marc Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
#else
-static const char rcsid[] = "$OpenBSD: hash.c,v 1.16 2003/06/02 20:18:33 millert Exp $";
+static const char rcsid[] = "$OpenBSD: hash.c,v 1.17 2004/06/21 23:13:22 marc Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -510,7 +510,7 @@ flush_meta(hashp)
else
if (wsize != sizeof(HASHHDR)) {
errno = EFTYPE;
- hashp->errno = errno;
+ hashp->err = errno;
return (-1);
}
for (i = 0; i < NCACHED; i++)
@@ -541,7 +541,7 @@ hash_get(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
return (hash_access(hashp, HASH_GET, (DBT *)key, data));
@@ -558,11 +558,11 @@ hash_put(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_NOOVERWRITE) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->errno = errno = EPERM;
+ hashp->err = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, flag == R_NOOVERWRITE ?
@@ -579,11 +579,11 @@ hash_delete(dbp, key, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_CURSOR) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->errno = errno = EPERM;
+ hashp->err = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
@@ -734,7 +734,7 @@ hash_seq(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_FIRST && flag != R_NEXT) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
#ifdef HASH_STATISTICS
diff --git a/lib/libc/db/hash/hash.h b/lib/libc/db/hash/hash.h
index 2c023318ebe..4486f6b2081 100644
--- a/lib/libc/db/hash/hash.h
+++ b/lib/libc/db/hash/hash.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hash.h,v 1.8 2003/06/02 20:18:33 millert Exp $ */
+/* $OpenBSD: hash.h,v 1.9 2004/06/21 23:13:22 marc Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -101,7 +101,7 @@ typedef struct htab { /* Memory resident data structure */
BUFHEAD *cpage; /* Current page */
int cbucket; /* Current bucket */
int cndx; /* Index of next item on cpage */
- int errno; /* Error Number -- for DBM
+ int err; /* Error Number -- for DBM
* compatibility */
int new_file; /* Indicates if fd is backing store
* or no */
diff --git a/lib/libc/db/hash/ndbm.c b/lib/libc/db/hash/ndbm.c
index f8c5242d8f9..c6ed005b53b 100644
--- a/lib/libc/db/hash/ndbm.c
+++ b/lib/libc/db/hash/ndbm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ndbm.c,v 1.18 2004/05/03 17:27:50 millert Exp $ */
+/* $OpenBSD: ndbm.c,v 1.19 2004/06/21 23:13:22 marc Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)dbm.c 8.6 (Berkeley) 11/7/95";
#else
-static const char rcsid[] = "$OpenBSD: ndbm.c,v 1.18 2004/05/03 17:27:50 millert Exp $";
+static const char rcsid[] = "$OpenBSD: ndbm.c,v 1.19 2004/06/21 23:13:22 marc Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -363,7 +363,7 @@ dbm_error(db)
HTAB *hp;
hp = (HTAB *)db->internal;
- return (hp->errno);
+ return (hp->err);
}
int
@@ -373,7 +373,7 @@ dbm_clearerr(db)
HTAB *hp;
hp = (HTAB *)db->internal;
- hp->errno = 0;
+ hp->err = 0;
return (0);
}