From 4464bbb265280cd2bd015a662b76a316c228cc28 Mon Sep 17 00:00:00 2001 From: Nate Straz Date: Tue, 8 Aug 2006 16:28:59 +0000 Subject: Force the cookie parts to be 32 bits to make Dean happy. --- btime.c | 4 ++-- btime_int.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/btime.c b/btime.c index 5e151be..9deca7d 100644 --- a/btime.c +++ b/btime.c @@ -168,8 +168,8 @@ static void gen_cookie(char *s) *a++ = 'B'; *a++ = 'T'; for (i = 0; i < COOKIE_RANDOM_PARTS; i++) { - *(int *)a = random(); - a += sizeof(int); + *(int32_t *)a = (int32_t)random(); + a += sizeof(int32_t); } *a = '\n'; } diff --git a/btime_int.h b/btime_int.h index 73adaa4..38f043f 100644 --- a/btime_int.h +++ b/btime_int.h @@ -10,5 +10,5 @@ #define MAX_RETRY 5 #define COOKIE_RANDOM_PARTS 4 -#define COOKIE_LEN (3 + (COOKIE_RANDOM_PARTS * sizeof(int))) +#define COOKIE_LEN (3 + (COOKIE_RANDOM_PARTS * sizeof(int32_t))) #endif /* __BTIME_INT_H */ -- cgit