summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-08 13:29:33 +0200
committerVolker Lendecke <vl@samba.org>2013-09-09 17:02:28 +0200
commitb8100af38441d40d5834af3734432eb5ca4da73b (patch)
tree18804964d6810360d1d969c7c0734876e2283e68 /source3
parent8f4069c7cd10a143286c7a32c1b612380afd7c72 (diff)
downloadsamba-b8100af38441d40d5834af3734432eb5ca4da73b.tar.gz
samba-b8100af38441d40d5834af3734432eb5ca4da73b.tar.bz2
samba-b8100af38441d40d5834af3734432eb5ca4da73b.zip
gencache: Avoid a duplicate call to string_term_tdb_data
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Sep 9 17:02:28 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/gencache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index 2c5e9ab424..835f5e17d5 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -443,21 +443,19 @@ bool gencache_parse(const char *keystr,
void *private_data)
{
struct gencache_parse_state state;
- TDB_DATA key;
+ TDB_DATA key = string_term_tdb_data(keystr);
int ret;
if (keystr == NULL) {
return false;
}
- if (tdb_data_cmp(string_term_tdb_data(keystr),
- last_stabilize_key()) == 0) {
+ if (tdb_data_cmp(key, last_stabilize_key()) == 0) {
return false;
}
if (!gencache_init()) {
return false;
}
- key = string_term_tdb_data(keystr);
state.parser = parser;
state.private_data = private_data;