efl_ui_datepicker: Fix uninitialized scalar value
authorChristopher Michael <cp.michael@samsung.com>
Thu, 14 Mar 2019 11:22:26 +0000 (07:22 -0400)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 2 Apr 2019 03:45:17 +0000 (12:45 +0900)
Summary:
Coverity reports field t.tm_sec is unitialized when calling
efl_datetime_manager_value_set, so this patch uninitializes it to 0.

Fixes Coverity CID1397006

@fix

Reviewers: raster, cedric, q66, zmike, bu5hm4n, stefan

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8318

src/lib/elementary/efl_ui_datepicker.c

index 872f67b..b7978b1 100644 (file)
@@ -27,6 +27,7 @@
      t.tm_year = pd->cur_date[DATEPICKER_YEAR] - 1900;               \
      t.tm_mon = pd->cur_date[DATEPICKER_MONTH] - 1;                  \
      t.tm_mday = pd->cur_date[DATEPICKER_DAY];                       \
+     t.tm_sec = 0;                                                   \
      efl_datetime_manager_value_set(pd->dt_manager, t);              \
    } while (0)