diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-05 11:29:26 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-05 11:29:26 +0000 |
commit | 39cc2512acbcf56ffbf87e3d26afc0450ca37de9 (patch) | |
tree | 69bde184c07add3dfd3ad7479bf72b5bdcb584d6 /compat/fetch.c | |
parent | ff788884bcaeeb59579ff88f51b90e57c1f8c3be (diff) | |
download | gdbm-39cc2512acbcf56ffbf87e3d26afc0450ca37de9.tar.gz |
Rewrite using ndbm interface.
Diffstat (limited to 'compat/fetch.c')
-rw-r--r-- | compat/fetch.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/compat/fetch.c b/compat/fetch.c index a0d03ae..00d369e 100644 --- a/compat/fetch.c +++ b/compat/fetch.c @@ -19,10 +19,7 @@ /* Include system configuration before all else. */ #include "autoconf.h" - -#include "gdbmdefs.h" -#include "extern.h" - +#include "dbm-priv.h" /* Look up a given KEY and return the information associated with that KEY. The pointer in the structure that is returned is a pointer to dynamically @@ -31,15 +28,5 @@ datum fetch (datum key) { - datum ret_val; /* The return value. */ - - /* Free previous dynamic memory, do actual call, and save pointer to new - memory. */ - ret_val = gdbm_fetch (_gdbm_file, key); - if (_gdbm_fetch_val != NULL) free (_gdbm_fetch_val); - _gdbm_fetch_val = ret_val.dptr; - - /* Return the new value. */ - return ret_val; - + return dbm_fetch (_gdbm_file, key); } |