summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-02-19 22:50:29 +0000
committerTim Potter <tpot@samba.org>2003-02-19 22:50:29 +0000
commitaa1a248336776079ba305744d35f529bd17d2e94 (patch)
treee2473b0670a6f5a76f43b5c3acf8c1ba26d24242
parentfe2f9f813df43a3d7313cc4d54e71ed3b1a04b02 (diff)
downloadsamba-aa1a248336776079ba305744d35f529bd17d2e94.tar.gz
samba-aa1a248336776079ba305744d35f529bd17d2e94.tar.bz2
samba-aa1a248336776079ba305744d35f529bd17d2e94.zip
Merge cleanups of return values.
(This used to be commit bae354a20c07458722b5193911e7eaaf9bfbaeb7)
-rw-r--r--source3/lib/gencache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index 2c356d24e8..7260e477b8 100644
--- a/source3/lib/gencache.c
+++ b/source3/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;
}