On Sat, May 12, 2018 at 10:18:22AM +0800, Nan Xiao wrote:
> Hi tech@,
> 
> Following is a trivial modification which removes unnecessary
> initialization of timeval. I am Sorry if this patch seems a little picky.

There are half-way cases elsewhere in the tree where we timerclear or
timespecclear and then only assign a single member.  I wouldn't bother
fixing *those*, but this one is indeed totally unnecessary.

ok cheloha@

If anyone else is ok I can commit.

> Index: tcpbench.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.c,v
> retrieving revision 1.55
> diff -u -p -r1.55 tcpbench.c
> --- tcpbench.c        10 May 2018 14:29:17 -0000      1.55
> +++ tcpbench.c        12 May 2018 02:06:54 -0000
> @@ -253,7 +253,6 @@ set_slice_timer(int on)
>       if (on) {
>               if (evtimer_pending(&mainstats.timer, NULL))
>                       return;
> -             timerclear(&tv);
>               /* XXX Is there a better way to do this ? */
>               tv.tv_sec = ptb->rflag / 1000;
>               tv.tv_usec = (ptb->rflag % 1000) * 1000;
> 
> -- 
> Best Regards
> Nan Xiao
> 

Reply via email to