From: Thibault Godouet Date: Wed, 7 Nov 2007 09:15:40 +0000 (+0000) Subject: fixed variable 'seed' assignement: was using ^= instead of = X-Git-Tag: ver3_0_4~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40b295c890be808ae6e1a6c157b40462e3cc1300;p=thirdparty%2Ffcron.git fixed variable 'seed' assignement: was using ^= instead of = --- diff --git a/fcron.c b/fcron.c index 0a04db8..dffbe85 100644 --- a/fcron.c +++ b/fcron.c @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.81 2007-06-24 22:01:22 thib Exp $ */ + /* $Id: fcron.c,v 1.82 2007-11-07 09:15:40 thib Exp $ */ #include "fcron.h" @@ -33,7 +33,7 @@ #include "socket.h" #endif -char rcs_info[] = "$Id: fcron.c,v 1.81 2007-06-24 22:01:22 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.82 2007-11-07 09:15:40 thib Exp $"; void main_loop(void); void check_signal(void); @@ -646,9 +646,9 @@ main(int argc, char **argv) #ifdef HAVE_GETTIMEOFDAY struct timeval tv; /* we use usec field to get more precision */ gettimeofday(&tv, NULL); - seed ^= ((unsigned int) tv.tv_usec) ^ ((unsigned int) tv.tv_sec); + seed = ((unsigned int) tv.tv_usec) ^ ((unsigned int) tv.tv_sec); #else - seed ^= (unsigned int) time(NULL); + seed = (unsigned int) time(NULL); #endif gethostname(hostname, sizeof(hostname));