* Oops, ratio should be a double, not a float.

This commit is contained in:
Sam Hocevar
2007-01-14 20:47:18 +00:00
committed by sam
parent 9587362904
commit b1541cb9fe
4 changed files with 7 additions and 7 deletions

View File

@@ -54,7 +54,7 @@ static int *fds, static_fds[STATIC_FILES];
static int maxfd, nfiles;
static int32_t seed = DEFAULT_SEED;
static float ratio = DEFAULT_RATIO;
static double ratio = DEFAULT_RATIO;
static int autoinc = 0;
void _zz_include(char const *regex)
@@ -74,7 +74,7 @@ void _zz_setseed(int32_t s)
seed = s;
}
void _zz_setratio(float r)
void _zz_setratio(double r)
{
if(r < MIN_RATIO)
r = MIN_RATIO;

View File

@@ -19,7 +19,7 @@
extern void _zz_include(char const *);
extern void _zz_exclude(char const *);
extern void _zz_setseed(int32_t);
extern void _zz_setratio(float);
extern void _zz_setratio(double);
extern void _zz_setautoinc(void);
extern void _zz_fd_init(void);
extern void _zz_fd_fini(void);

View File

@@ -36,7 +36,7 @@
struct fuzz
{
uint32_t seed;
float ratio;
double ratio;
int cur;
#ifdef HAVE_FGETLN
char *tmp;

View File

@@ -82,8 +82,8 @@ static char **newargv;
static char *protect = NULL, *refuse = NULL;
static uint32_t seed = DEFAULT_SEED;
static uint32_t endseed = DEFAULT_SEED + 1;
static float ratio = DEFAULT_RATIO;
static float endratio = DEFAULT_RATIO;
static double ratio = DEFAULT_RATIO;
static double endratio = DEFAULT_RATIO;
static int quiet = 0;
static int maxbytes = -1;
static int md5 = 0;
@@ -443,7 +443,7 @@ static char *merge_regex(char *regex, char *string)
static void spawn_children(void)
{
static int const files[] = { DEBUG_FILENO, STDERR_FILENO, STDOUT_FILENO };
char buf[BUFSIZ];
char buf[64];
int fd[3][2];
int64_t now = _zz_time();
pid_t pid;