summaryrefslogtreecommitdiff
path: root/lib/libc/db
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1996-01-22 00:02:33 +0000
committerJulian Elischer <julian@FreeBSD.org>1996-01-22 00:02:33 +0000
commitf70177e76e605ec6e6cd5b938fa77ade5d380e87 (patch)
treea89c7f50ec371cef4418259b9dccdd31ebb2f61f /lib/libc/db
parent61de51cad66df0d565233915f856932159d33a4a (diff)
Notes
Diffstat (limited to 'lib/libc/db')
-rw-r--r--lib/libc/db/hash/hash.c14
-rw-r--r--lib/libc/db/hash/hash.h2
-rw-r--r--lib/libc/db/hash/ndbm.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 6a23f3d801cb..76da99c055aa 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -505,7 +505,7 @@ flush_meta(hashp)
else
if (wsize != sizeof(HASHHDR)) {
errno = EFTYPE;
- hashp->errno = errno;
+ hashp->error = errno;
return (-1);
}
for (i = 0; i < NCACHED; i++)
@@ -536,7 +536,7 @@ hash_get(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag) {
- hashp->errno = errno = EINVAL;
+ hashp->error = errno = EINVAL;
return (ERROR);
}
return (hash_access(hashp, HASH_GET, (DBT *)key, data));
@@ -553,11 +553,11 @@ hash_put(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_NOOVERWRITE) {
- hashp->errno = errno = EINVAL;
+ hashp->error = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->errno = errno = EPERM;
+ hashp->error = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, flag == R_NOOVERWRITE ?
@@ -574,11 +574,11 @@ hash_delete(dbp, key, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_CURSOR) {
- hashp->errno = errno = EINVAL;
+ hashp->error = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->errno = errno = EPERM;
+ hashp->error = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
@@ -729,7 +729,7 @@ hash_seq(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_FIRST && flag != R_NEXT) {
- hashp->errno = errno = EINVAL;
+ hashp->error = errno = EINVAL;
return (ERROR);
}
#ifdef HASH_STATISTICS
diff --git a/lib/libc/db/hash/hash.h b/lib/libc/db/hash/hash.h
index 1c80f83c69d5..8664bd4816d9 100644
--- a/lib/libc/db/hash/hash.h
+++ b/lib/libc/db/hash/hash.h
@@ -98,7 +98,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 compatability */
+ int error; /* Error Number -- for DBM compatability */
int new_file; /* Indicates if fd is backing store or no */
int save_file; /* Indicates whether we need to flush file at
* exit */
diff --git a/lib/libc/db/hash/ndbm.c b/lib/libc/db/hash/ndbm.c
index 89b9916566b2..2b54402ae2f7 100644
--- a/lib/libc/db/hash/ndbm.c
+++ b/lib/libc/db/hash/ndbm.c
@@ -180,7 +180,7 @@ dbm_error(db)
HTAB *hp;
hp = (HTAB *)db->internal;
- return (hp->errno);
+ return (hp->error);
}
extern int
@@ -190,7 +190,7 @@ dbm_clearerr(db)
HTAB *hp;
hp = (HTAB *)db->internal;
- hp->errno = 0;
+ hp->error = 0;
return (0);
}