Explicitly initialize struct tm with zeroes
This is recommended by the manual as strptime(), in principle, might only touch the fields it parses from the string. Given the struct tm implementations differ from operating system to operating system, we make sure and set everything to zero before passing it to strptime(). Signed-off-by: Laslo Hunhold <dev@frign.de>
This commit is contained in:
parent
660b308617
commit
6b508a0e07
1 changed files with 1 additions and 1 deletions
2
http.c
2
http.c
|
@ -350,7 +350,7 @@ http_send_response(int fd, struct request *r)
|
||||||
{
|
{
|
||||||
struct in6_addr res;
|
struct in6_addr res;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
struct tm tm;
|
struct tm tm = { 0 };
|
||||||
size_t len, i;
|
size_t len, i;
|
||||||
off_t lower, upper;
|
off_t lower, upper;
|
||||||
int hasport, ipv6host;
|
int hasport, ipv6host;
|
||||||
|
|
Loading…
Reference in a new issue