Calculate returned timeval correctly when using SO_SNDTIMEO/SO_RCVTIME;

from Koji Imada <koji@math.human.nagoya-u.ac.jp> in PR/3682.
This commit is contained in:
kleink 1997-06-11 10:04:09 +00:00
parent 9e3c291da4
commit 372bfc7c08
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_socket.c,v 1.26 1997/01/11 05:15:01 thorpej Exp $ */
/* $NetBSD: uipc_socket.c,v 1.27 1997/06/11 10:04:09 kleink Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1990, 1993
@ -1030,7 +1030,7 @@ sogetopt(so, level, optname, mp)
m->m_len = sizeof(struct timeval);
mtod(m, struct timeval *)->tv_sec = val / hz;
mtod(m, struct timeval *)->tv_usec =
(val % hz) / tick;
(val % hz) * tick;
break;
}