summaryrefslogtreecommitdiffabout
path: root/src/findkey.c
authorSergey Poznyakoff <gray@gnu.org>2018-05-24 05:28:51 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-05-24 05:29:47 (GMT)
commitf82d0b213fd2cdce80dc891906fba8d589115664 (patch) (unidiff)
tree9aa091d9fbe7fea183391fc9e22fc0f2f54ae28f /src/findkey.c
parent0665bcf0c9cdf756f9d5edc6a638c56602c42065 (diff)
downloadgdbm-f82d0b213fd2cdce80dc891906fba8d589115664.tar.gz
gdbm-f82d0b213fd2cdce80dc891906fba8d589115664.tar.bz2
Fix the use of return code from _gdbm_full_(read|write) functions
Diffstat (limited to 'src/findkey.c') (more/less context) (show whitespace changes)
-rw-r--r--src/findkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/findkey.c b/src/findkey.c
index 211d9a9..7638b04 100644
--- a/src/findkey.c
+++ b/src/findkey.c
@@ -74,25 +74,25 @@ _gdbm_read_entry (GDBM_FILE dbf, int elem_loc)
74 _gdbm_fatal (dbf, _("lseek error")); 74 _gdbm_fatal (dbf, _("lseek error"));
75 return NULL; 75 return NULL;
76 } 76 }
77 77
78 rc = GDBM_DEBUG_OVERRIDE ("_gdbm_read_entry:read-failure", 78 rc = GDBM_DEBUG_OVERRIDE ("_gdbm_read_entry:read-failure",
79 _gdbm_full_read (dbf, data_ca->dptr, key_size+data_size)); 79 _gdbm_full_read (dbf, data_ca->dptr, key_size+data_size));
80 if (rc) 80 if (rc)
81 { 81 {
82 GDBM_DEBUG (GDBM_DEBUG_ERR|GDBM_DEBUG_LOOKUP|GDBM_DEBUG_READ, 82 GDBM_DEBUG (GDBM_DEBUG_ERR|GDBM_DEBUG_LOOKUP|GDBM_DEBUG_READ,
83 "%s: error reading entry: %s", 83 "%s: error reading entry: %s",
84 dbf->name, gdbm_db_strerror (dbf)); 84 dbf->name, gdbm_db_strerror (dbf));
85 dbf->need_recovery = TRUE; 85 dbf->need_recovery = TRUE;
86 _gdbm_fatal (dbf, gdbm_strerror (rc)); 86 _gdbm_fatal (dbf, gdbm_db_strerror (dbf));
87 return NULL; 87 return NULL;
88 } 88 }
89 89
90 return data_ca->dptr; 90 return data_ca->dptr;
91} 91}
92 92
93/* Find the KEY in the file and get ready to read the associated data. The 93/* Find the KEY in the file and get ready to read the associated data. The
94 return value is the location in the current hash bucket of the KEY's 94 return value is the location in the current hash bucket of the KEY's
95 entry. If it is found, additional data are returned as follows: 95 entry. If it is found, additional data are returned as follows:
96 96
97 If RET_DPTR is not NULL, a pointer to the actual data is stored in it. 97 If RET_DPTR is not NULL, a pointer to the actual data is stored in it.
98 If RET_HASH_VAL is not NULL, it is assigned the actual hash value. 98 If RET_HASH_VAL is not NULL, it is assigned the actual hash value.

Return to:

Send suggestions and report system problems to the System administrator.