From e11023671fa3e05c404d1277a6fe6855c79ce923 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 1 Aug 2011 11:22:26 +0000 Subject: Use GDBM_FILE instead of gdbm_file_info *. (gdbm_open): Fix signature to match global declaration --- src/gdbmopen.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gdbmopen.c b/src/gdbmopen.c index 9992b6f..03a3473 100644 --- a/src/gdbmopen.c +++ b/src/gdbmopen.c @@ -21,7 +21,6 @@ #include "autoconf.h" #include "gdbmdefs.h" -#include "gdbmerrno.h" /* Determine our native magic number and bail if we can't. */ #if SIZEOF_OFF_T == 4 @@ -52,11 +51,11 @@ returned. */ -gdbm_file_info * -gdbm_open (char *file, int block_size, int flags, int mode, +GDBM_FILE +gdbm_open (const char *file, int block_size, int flags, int mode, void (*fatal_func) (const char *)) { - gdbm_file_info *dbf; /* The record to return. */ + GDBM_FILE dbf; /* The record to return. */ struct stat file_stat; /* Space for the stat information. */ int len; /* Length of the file name. */ int num_bytes; /* Used in reading and writing. */ @@ -71,7 +70,7 @@ gdbm_open (char *file, int block_size, int flags, int mode, gdbm_errno = GDBM_NO_ERROR; /* Allocate new info structure. */ - dbf = (gdbm_file_info *) malloc (sizeof (gdbm_file_info)); + dbf = (GDBM_FILE) malloc (sizeof (*dbf)); if (dbf == NULL) { gdbm_errno = GDBM_MALLOC_ERROR; @@ -426,7 +425,7 @@ gdbm_open (char *file, int block_size, int flags, int mode, /* Initialize the bucket cache. */ int -_gdbm_init_cache(gdbm_file_info *dbf, int size) +_gdbm_init_cache(GDBM_FILE dbf, int size) { int index; -- cgit v1.2.1