Dont write through a zero pointer (when in probe mode of a2kugettod()).

This commit is contained in:
is 1999-03-28 21:39:59 +00:00
parent 3945730dbc
commit 67caec5886
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: a2kbbc.c,v 1.6 1999/03/14 22:42:12 is Exp $ */ /* $NetBSD: a2kbbc.c,v 1.7 1999/03/28 21:39:59 is Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -177,8 +177,10 @@ a2kugettod(tvp)
return (0); return (0);
secs = clock_ymdhms_to_secs(&dt); secs = clock_ymdhms_to_secs(&dt);
tvp->tv_sec = secs; if (tvp) {
tvp->tv_usec = 0; tvp->tv_sec = secs;
tvp->tv_usec = 0;
}
return (1); return (1);
} }