Skip to content

Commit

Permalink
gencache: Avoid a duplicate call to string_term_tdb_data
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>

Autobuild-User(master): Volker Lendecke <[email protected]>
Autobuild-Date(master): Mon Sep  9 17:02:28 CEST 2013 on sn-devel-104
  • Loading branch information
vlendec committed Sep 9, 2013
1 parent 8f4069c commit b8100af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source3/lib/gencache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b8100af

Please sign in to comment.