Skip to content

Commit 48df693

Browse files
committed
Fixed: correct cleaning of the structure before using
1 parent af8f088 commit 48df693

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed
-512 Bytes
Binary file not shown.

projects/msvs/httpserverapp.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HTTPSERVERAPP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
114114
<AssemblerListingLocation>$(IntDir)asm\</AssemblerListingLocation>
115115
<ObjectFileName>$(IntDir)obj\</ObjectFileName>
116+
<MultiProcessorCompilation>true</MultiProcessorCompilation>
116117
</ClCompile>
117118
<Link>
118119
<SubSystem>Windows</SubSystem>
@@ -127,6 +128,7 @@
127128
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HTTPSERVERAPP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
128129
<AssemblerListingLocation>$(IntDir)asm\</AssemblerListingLocation>
129130
<ObjectFileName>$(IntDir)obj\</ObjectFileName>
131+
<MultiProcessorCompilation>true</MultiProcessorCompilation>
130132
</ClCompile>
131133
<Link>
132134
<SubSystem>Windows</SubSystem>
@@ -143,6 +145,7 @@
143145
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
144146
<AssemblerListingLocation>$(IntDir)asm\</AssemblerListingLocation>
145147
<ObjectFileName>$(IntDir)obj\</ObjectFileName>
148+
<MultiProcessorCompilation>true</MultiProcessorCompilation>
146149
</ClCompile>
147150
<Link>
148151
<SubSystem>Windows</SubSystem>
@@ -161,6 +164,7 @@
161164
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
162165
<AssemblerListingLocation>$(IntDir)asm\</AssemblerListingLocation>
163166
<ObjectFileName>$(IntDir)obj\</ObjectFileName>
167+
<MultiProcessorCompilation>true</MultiProcessorCompilation>
164168
</ClCompile>
165169
<Link>
166170
<SubSystem>Windows</SubSystem>

src/Utils.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
#include "Utils.h"
33

44
#include <array>
5+
#include <chrono>
56
#include <cstring>
7+
#include <sstream>
68
#include <iomanip>
9+
#include <cstdint>
10+
#include <cctype>
711

812
namespace Utils
913
{
@@ -266,7 +270,8 @@ namespace Utils
266270
const size_t str_mon_length = 64;
267271
std::vector<char> s_mon(str_mon_length);
268272

269-
struct ::tm tc = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
273+
struct ::tm tc;
274+
memset(&tc, 0, sizeof(tc) );
270275

271276
// Parse RFC 822
272277
#ifdef WIN32

src/Utils.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44
#include "FileIncoming.h"
55

66
#include <locale>
7-
#include <string>
8-
#include <algorithm>
9-
#include <functional>
10-
#include <sstream>
11-
#include <chrono>
12-
#include <map>
7+
#include <vector>
138
#include <unordered_map>
14-
#include <cctype>
159

1610
namespace Utils
1711
{

0 commit comments

Comments
 (0)