summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jeremy@jeremy-desktop.(none)>2008-12-23 11:45:26 -0800
committerJeremy Allison <jeremy@jeremy-desktop.(none)>2008-12-23 11:45:26 -0800
commit94df767f21003507f01b9b08d7c52b5b8819977f (patch)
tree079898bbe161cd9b21ddc8476fbe3194e20bc83d /source3/passdb
parentb143938b8afaa7c7759e09228cc0d92ff97121d0 (diff)
downloadsamba-94df767f21003507f01b9b08d7c52b5b8819977f.tar.gz
samba-94df767f21003507f01b9b08d7c52b5b8819977f.tar.bz2
samba-94df767f21003507f01b9b08d7c52b5b8819977f.zip
More asprintf warning fixes.
Jeremy.
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/login_cache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index 8222f77b95..4e14293e73 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -35,14 +35,13 @@ bool login_cache_init(void)
/* skip file open if it's already opened */
if (cache) return True;
- asprintf(&cache_fname, "%s/%s", lp_lockdir(), LOGIN_CACHE_FILE);
- if (cache_fname)
- DEBUG(5, ("Opening cache file at %s\n", cache_fname));
- else {
+ if (asprintf(&cache_fname, "%s/%s", lp_lockdir(), LOGIN_CACHE_FILE) == -1) {
DEBUG(0, ("Filename allocation failed.\n"));
return False;
}
+ DEBUG(5, ("Opening cache file at %s\n", cache_fname));
+
cache = tdb_open_log(cache_fname, 0, TDB_DEFAULT,
O_RDWR|O_CREAT, 0644);