diff --git a/nshlib/nsh_timcmds.c b/nshlib/nsh_timcmds.c index 1004c667d..bbfb7138a 100644 --- a/nshlib/nsh_timcmds.c +++ b/nshlib/nsh_timcmds.c @@ -1,7 +1,7 @@ /**************************************************************************** * apps/nshlib/dbg_timcmds.c * - * Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012, 2014, 2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -166,6 +166,8 @@ static inline int date_settime(FAR struct nsh_vtbl_s *vtbl, FAR const char *name long result; int ret; + memset(&tm, 0, sizeof(tm)); + /* Only this date format is supported: MMM DD HH:MM:SS YYYY */ /* Get the month abbreviation */