[PATCH] Bug report and patch for strace's -O option

Dmitry V. Levin ldv at altlinux.org
Thu Jun 28 15:17:23 UTC 2007


Hi,

On Thu, Jun 28, 2007 at 10:10:31AM +0800, Cai Fei wrote:
[...]
> I checked the code and found that there's something wrong
> in the util.c. The bug can be fixed with the following patch:
> 
> Signed-off-by: "Cai Fei" <caifei at cn.fujitsu.com>
> 
> --- util.c	2007-06-28 09:48:34.000000000 +0800
> +++ util.c.new	2007-06-28 09:49:10.000000000 +0800
> @@ -227,7 +227,7 @@ struct timeval *tv, *a;
>  int n;
>  {
>  	tv->tv_usec = a->tv_usec * n;
> -	tv->tv_sec = a->tv_sec * n + a->tv_usec / 1000000;
> +	tv->tv_sec = a->tv_sec * n + tv->tv_usec / 1000000;
>  	tv->tv_usec %= 1000000;
>  }

Looks OK for me.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20070628/768fb3a5/attachment.bin>


More information about the Strace-devel mailing list