Kaydet (Commit) 62a8e95f authored tarafından Christian Heimes's avatar Christian Heimes

Coverity issue CID #197

var_decl: Declared variable "stm" without initializer
ninit_use_in_call: Using uninitialized value "stm" (field "stm".tm_zone uninitialized) in call to function "mktime"
üst 6d22c396
...@@ -1001,6 +1001,8 @@ parse_dostime(int dostime, int dosdate) ...@@ -1001,6 +1001,8 @@ parse_dostime(int dostime, int dosdate)
{ {
struct tm stm; struct tm stm;
memset((void *) &stm, '\0', sizeof(stm));
stm.tm_sec = (dostime & 0x1f) * 2; stm.tm_sec = (dostime & 0x1f) * 2;
stm.tm_min = (dostime >> 5) & 0x3f; stm.tm_min = (dostime >> 5) & 0x3f;
stm.tm_hour = (dostime >> 11) & 0x1f; stm.tm_hour = (dostime >> 11) & 0x1f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment