In case the clock_gettime call fails, the timespec values need to be
a sane value.
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@784
64e312b2-a51f-0410-8e61-
82d0ca0eb02a
{
TestResult *tr;
Suite *s;
- static struct timespec ts_start;
+ static struct timespec ts_start = {0};
static char t[sizeof "yyyy-mm-dd hh:mm:ss"] = {0};
if (t[0] == 0)
break;
case CLENDLOG_SR:
{
- struct timespec ts_end;
+ struct timespec ts_end = {0};
unsigned int duration;
/* calculate time the test were running */
static TestResult *tcase_run_tfun_nofork (SRunner *sr, TCase *tc, TF *tfun, int i)
{
TestResult *tr;
- struct timespec ts_start, ts_end;
+ struct timespec ts_start={0}, ts_end={0};
tr = tcase_run_checked_setup(sr, tc);
if (tr == NULL) {
pid_t pid_w;
pid_t pid;
int status = 0;
- struct timespec ts_start, ts_end;
+ struct timespec ts_start = {0}, ts_end = {0};
int timer_create_result;
timer_t timerid;