diff options
author | Tim Potter <tpot@samba.org> | 2003-02-19 22:50:29 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-02-19 22:50:29 +0000 |
commit | bae354a20c07458722b5193911e7eaaf9bfbaeb7 (patch) | |
tree | 89d567bbe6131157f0630834fe8819ceb3ad2e0d /source/lib/gencache.c | |
parent | c4f46890fe7f0dc16520cd5ed0fd06dcd7682703 (diff) | |
download | samba-bae354a20c07458722b5193911e7eaaf9bfbaeb7.tar.gz samba-bae354a20c07458722b5193911e7eaaf9bfbaeb7.tar.xz samba-bae354a20c07458722b5193911e7eaaf9bfbaeb7.zip |
Merge cleanups of return values.
Diffstat (limited to 'source/lib/gencache.c')
-rw-r--r-- | source/lib/gencache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/lib/gencache.c b/source/lib/gencache.c index 2c356d24e8e..7260e477b80 100644 --- a/source/lib/gencache.c +++ b/source/lib/gencache.c @@ -83,10 +83,10 @@ BOOL gencache_init(void) BOOL gencache_shutdown(void) { - /* tdb_close routine returns 0 on successful close */ + /* tdb_close routine returns -1 on error */ if (!cache) return False; DEBUG(5, ("Closing cache file\n")); - return tdb_close(cache) ? False : True; + return tdb_close(cache) != -1; } @@ -127,7 +127,7 @@ BOOL gencache_set(const char *keystr, const char *value, time_t timeout) SAFE_FREE(keybuf.dptr); SAFE_FREE(databuf.dptr); - return ret == 0 ? True : False; + return ret == 0; } @@ -182,7 +182,7 @@ BOOL gencache_set_only(const char *keystr, const char *valstr, time_t timeout) SAFE_FREE(keybuf.dptr); SAFE_FREE(databuf.dptr); - return ret == 0 ? True : False; + return ret == 0; } @@ -211,7 +211,7 @@ BOOL gencache_del(const char *keystr) ret = tdb_delete(cache, keybuf); SAFE_FREE(keybuf.dptr); - return ret == 0 ? True : False; + return ret == 0; } |