X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fmagic.c;h=6a5a7eb28ee67cac69db337c3f833b5c0d42c45f;hb=2883dd07101bf851e2ea368f0c04c91aea85cff2;hp=2fb23ff4adf48b68e6da309eb90373cd6bcc1d0f;hpb=71d3de90eae52087b405e962ca650b71cec79c67;p=ppp.git diff --git a/pppd/magic.c b/pppd/magic.c index 2fb23ff..6a5a7eb 100644 --- a/pppd/magic.c +++ b/pppd/magic.c @@ -40,7 +40,9 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: magic.c,v 1.11 2003/06/11 23:56:26 paulus Exp $" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include @@ -51,10 +53,9 @@ #include "pppd.h" #include "magic.h" -static const char rcsid[] = RCSID; -extern long mrand48 __P((void)); -extern void srand48 __P((long)); +extern long mrand48 (void); +extern void srand48 (long); /* * magic_init - Initialize the magic number generator. @@ -64,7 +65,7 @@ extern void srand48 __P((long)); * and current time, currently. */ void -magic_init() +magic_init(void) { long seed; struct timeval t; @@ -78,7 +79,7 @@ magic_init() * magic - Returns the next magic number. */ u_int32_t -magic() +magic(void) { return (u_int32_t) mrand48(); } @@ -102,20 +103,19 @@ random_bytes(unsigned char *buf, int len) */ double -drand48() +drand48(void) { return (double)random() / (double)0x7fffffffL; /* 2**31-1 */ } long -mrand48() +mrand48(void) { return random(); } void -srand48(seedval) -long seedval; +srand48(long seedval) { srandom((int)seedval); }