From: Volker Lendecke Date: Mon, 8 Oct 2018 07:07:59 +0000 (+0200) Subject: gencache: Avoid counting characters manually X-Git-Tag: tdb-1.3.17~1303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a29ffc3e0527733217a6f62d1669f60fab6e2ac;p=thirdparty%2Fsamba.git gencache: Avoid counting characters manually Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index 787ef981ec0..8919a165745 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -127,10 +127,12 @@ static bool gencache_init(void) static TDB_DATA last_stabilize_key(void) { - TDB_DATA result; - result.dptr = discard_const_p(uint8_t, "@LAST_STABILIZED"); - result.dsize = 17; - return result; + const char key[] = "@LAST_STABILIZED"; + + return (TDB_DATA) { + .dptr = discard_const_p(uint8_t, key), + .dsize = sizeof(key), + }; } struct gencache_have_val_state {