diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index 51caccc1..87da3870 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -1422,11 +1422,11 @@ bool Db::addOrUpdate(const string &udi, const string &parent_udi, Doc &doc) time_t mtime = atoll(doc.dmtime.empty() ? doc.fmtime.c_str() : doc.dmtime.c_str()); struct tm tmb; - struct tm *tmbp = &tmb; - tmbp = localtime_r(&mtime, &tmb); - char buf[9]; - snprintf(buf, 9, "%04d%02d%02d", - tmbp->tm_year+1900, tmbp->tm_mon + 1, tmbp->tm_mday); + localtime_r(&mtime, &tmb); + char buf[9]; + snprintf(buf, 9, "%04d%02d%02d", + tmb.tm_year+1900, tmb.tm_mon + 1, tmb.tm_mday); + // Date (YYYYMMDD) newdocument.add_boolean_term(wrap_prefix(xapday_prefix) + string(buf)); // Month (YYYYMM)