From: Andreas Schneider Date: Mon, 14 Jan 2019 11:10:34 +0000 (+0100) Subject: lib:ldb: Use correct C99 initializer for 'struct tm' X-Git-Tag: ldb-1.6.1~351 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=146ed0894e640fe1791f75fa8f50167b6cdfc06e;p=thirdparty%2Fsamba.git lib:ldb: Use correct C99 initializer for 'struct tm' Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- diff --git a/lib/ldb/common/ldb_msg.c b/lib/ldb/common/ldb_msg.c index c2782db6fb2..b51e4b1059e 100644 --- a/lib/ldb/common/ldb_msg.c +++ b/lib/ldb/common/ldb_msg.c @@ -1303,8 +1303,10 @@ time_t ldb_string_to_time(const char *s) */ int ldb_val_to_time(const struct ldb_val *v, time_t *t) { - char val[15] = {}; - struct tm tm = {}; + char val[15] = {0}; + struct tm tm = { + .tm_year = 0, + }; if (v == NULL) { return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;