Re: n_time in trpt(8)

2016-12-21 Thread Stefan Sperling
On Wed, Dec 21, 2016 at 10:01:28PM -0500, Lawrence Teo wrote:
> In 2014, mpi@ substituted n_time, n_long, and n_short with their equivalent
> u_int_* types throughout the network stack to remove the dependency on
> :
> 
> http://marc.info/?l=openbsd-tech=140523875001860=2
> 
> As mentioned in his mail, trpt(8) is the only program in userland that uses
> n_time.  The following diff does the final cleanup for trpt(8).
> 
> ok?

OK stsp@

I believe we prefer uint32_t over u_int32_t in new code.
I'm fine with either form in this case.


> 
> 
> Index: trpt.c
> ===
> RCS file: /cvs/src/usr.sbin/trpt/trpt.c,v
> retrieving revision 1.33
> diff -u -p -r1.33 trpt.c
> --- trpt.c27 Aug 2016 01:50:07 -  1.33
> +++ trpt.c1 Dec 2016 19:17:38 -
> @@ -73,7 +73,6 @@
>  #include 
>  
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> @@ -112,7 +111,7 @@ int   tcp_debx;
>  struct   tcp_debug tcp_debug[TCP_NDEBUG];
>  
>  static caddr_t tcp_pcbs[TCP_NDEBUG];
> -static n_time ntime;
> +static u_int32_t ntime;
>  static int aflag, follow, sflag, tflag;
>  
>  extern   char *__progname;
> 



n_time in trpt(8)

2016-12-21 Thread Lawrence Teo
In 2014, mpi@ substituted n_time, n_long, and n_short with their equivalent
u_int_* types throughout the network stack to remove the dependency on
:

http://marc.info/?l=openbsd-tech=140523875001860=2

As mentioned in his mail, trpt(8) is the only program in userland that uses
n_time.  The following diff does the final cleanup for trpt(8).

ok?


Index: trpt.c
===
RCS file: /cvs/src/usr.sbin/trpt/trpt.c,v
retrieving revision 1.33
diff -u -p -r1.33 trpt.c
--- trpt.c  27 Aug 2016 01:50:07 -  1.33
+++ trpt.c  1 Dec 2016 19:17:38 -
@@ -73,7 +73,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -112,7 +111,7 @@ int tcp_debx;
 struct tcp_debug tcp_debug[TCP_NDEBUG];
 
 static caddr_t tcp_pcbs[TCP_NDEBUG];
-static n_time ntime;
+static u_int32_t ntime;
 static int aflag, follow, sflag, tflag;
 
 extern char *__progname;