From 0f83707d6f05640eeff012500ebe66a1b8020df5 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Fri, 30 Jun 2023 09:57:26 -0700 Subject: Implement data pointer clang-tidy check readability-container-data-pointer flags one error in our codebase, but can definitely find issues in patchsets. Fix the one error (that came from crow), and enable the check. Change-Id: I3045ec9a58d80300c90921dda1a2fe3859ffed7b Signed-off-by: Ed Tanous --- http/http_server.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http') diff --git a/http/http_server.hpp b/http/http_server.hpp index 258193aee3..91de8db37d 100644 --- a/http/http_server.hpp +++ b/http/http_server.hpp @@ -67,7 +67,7 @@ class Server gmtime_r(&lastTimeT, &myTm); dateStr.resize(100); - size_t dateStrSz = strftime(&dateStr[0], 99, + size_t dateStrSz = strftime(dateStr.data(), dateStr.size() - 1, "%a, %d %b %Y %H:%M:%S GMT", &myTm); dateStr.resize(dateStrSz); } -- cgit v1.2.3