diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-07-31 10:39:53 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-07-31 10:39:53 +0300 |
commit | 1059526e357da1aa92e5c020332f4b39ceb37503 (patch) | |
tree | 70fd7679d8e575d93903ceeb60e75d6505b17edc | |
parent | 65e725ea916f3076ee417ae8fd70ca790a5000d8 (diff) | |
download | gdbm-1059526e357da1aa92e5c020332f4b39ceb37503.tar.gz gdbm-1059526e357da1aa92e5c020332f4b39ceb37503.tar.bz2 |
Bugfix
* src/gdbmsync.c (gdbm_sync): Always return a meaningful value
-rw-r--r-- | src/gdbmsync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gdbmsync.c b/src/gdbmsync.c index a8d1002..a75952b 100644 --- a/src/gdbmsync.c +++ b/src/gdbmsync.c | |||
@@ -19,20 +19,20 @@ | |||
19 | 19 | ||
20 | /* Include system configuration before all else. */ | 20 | /* Include system configuration before all else. */ |
21 | #include "autoconf.h" | 21 | #include "autoconf.h" |
22 | 22 | ||
23 | #include "gdbmdefs.h" | 23 | #include "gdbmdefs.h" |
24 | 24 | ||
25 | /* Make sure the database is all on disk. */ | 25 | /* Make sure the database is all on disk. */ |
26 | 26 | ||
27 | int | 27 | int |
28 | gdbm_sync (GDBM_FILE dbf) | 28 | gdbm_sync (GDBM_FILE dbf) |
29 | { | 29 | { |
30 | /* Return immediately if the database needs recovery */ | 30 | /* Return immediately if the database needs recovery */ |
31 | GDBM_ASSERT_CONSISTENCY (dbf, ); | 31 | GDBM_ASSERT_CONSISTENCY (dbf, -1); |
32 | 32 | ||
33 | /* Initialize the gdbm_errno variable. */ | 33 | /* Initialize the gdbm_errno variable. */ |
34 | gdbm_set_errno (dbf, GDBM_NO_ERROR, FALSE); | 34 | gdbm_set_errno (dbf, GDBM_NO_ERROR, FALSE); |
35 | 35 | ||
36 | /* Do the sync on the file. */ | 36 | /* Do the sync on the file. */ |
37 | return gdbm_file_sync (dbf); | 37 | return gdbm_file_sync (dbf); |
38 | } | 38 | } |