From: Volker Lendecke Date: Mon, 30 Sep 2019 05:48:34 +0000 (+0200) Subject: dbwrap_watch: Slightly simplify dbwrap_watched_fetch_locked() X-Git-Tag: talloc-2.3.1~514 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88f8edf69ba04b4df28d4986199fa13730d3a165;p=thirdparty%2Fsamba.git dbwrap_watch: Slightly simplify dbwrap_watched_fetch_locked() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c index b1a82d86006..902643ca307 100644 --- a/source3/lib/dbwrap/dbwrap_watch.c +++ b/source3/lib/dbwrap/dbwrap_watch.c @@ -255,6 +255,7 @@ static struct db_record *dbwrap_watched_fetch_locked( if (!ok) { return rec; /* fresh record */ } + rec->value = subrec->wrec.data; /* * subrec->wrec.watchers points *directly* into the @@ -272,10 +273,6 @@ static struct db_record *dbwrap_watched_fetch_locked( } subrec->wrec.watchers = watchers; - if (ok) { - rec->value = subrec->wrec.data; - } - return rec; }