X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fmagic.c;h=71647633d024a586dae624b4bfc59633693e2804;hp=20dfd6fe3a4823ee285fce41f89705ac35f3bddb;hb=4913812dc504b724932b336ed306b861bb11ae3f;hpb=0b63a24d54ba4708c88e31bdd74b0145956c1478 diff --git a/pppd/magic.c b/pppd/magic.c index 20dfd6f..7164763 100644 --- a/pppd/magic.c +++ b/pppd/magic.c @@ -18,21 +18,21 @@ */ #ifndef lint -static char rcsid[] = "$Id: magic.c,v 1.1 1993/11/11 03:54:25 paulus Exp $"; +static char rcsid[] = "$Id: magic.c,v 1.3 1994/09/21 06:47:37 paulus Exp $"; #endif #include #include #include +#include "pppd.h" #include "magic.h" +static u_int32_t next; /* Next value to return */ -static u_long next; /* Next value to return */ - -extern u_long gethostid __ARGS((void)); -extern long random __ARGS((void)); -extern void srandom __ARGS((int)); +extern u_int32_t gethostid __P((void)); +extern long random __P((void)); +extern void srandom __P((int)); /* @@ -51,7 +51,7 @@ void magic_init() perror("gettimeofday"); exit(1); } - next ^= (u_long) tv.tv_sec ^ (u_long) tv.tv_usec; + next ^= (u_int32_t) tv.tv_sec ^ (u_int32_t) tv.tv_usec; srandom((int) next); } @@ -60,11 +60,11 @@ void magic_init() /* * magic - Returns the next magic number. */ -u_long magic() +u_int32_t magic() { - u_long m; + u_int32_t m; m = next; - next = (u_long) random(); + next = (u_int32_t) random(); return (m); }