11 May
2018
11 May
'18
9:55 a.m.
From: Pan Xiuli xiuli.pan@linux.intel.com
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com --- rimage/css.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/rimage/css.c b/rimage/css.c index bc69cf1..79b5ace 100644 --- a/rimage/css.c +++ b/rimage/css.c @@ -32,6 +32,12 @@ void ri_css_hdr_create(struct image *image) /* get local time and date */ gettimeofday(&tv, NULL); date = localtime(&tv.tv_sec); + + if (!date) { + fprintf(stderr, "error: cant get localtime %d\n", -errno); + return; + } + date->tm_year += 1900; fprintf(stdout, " css: set build date to %d:%2.2d:%2.2d\n", date->tm_year, date->tm_mon, date->tm_mday);
--
2.7.4