* Oops, ratio should be a double, not a float.
This commit is contained in:
4
src/fd.c
4
src/fd.c
@@ -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;
|
||||
|
||||
2
src/fd.h
2
src/fd.h
@@ -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);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
struct fuzz
|
||||
{
|
||||
uint32_t seed;
|
||||
float ratio;
|
||||
double ratio;
|
||||
int cur;
|
||||
#ifdef HAVE_FGETLN
|
||||
char *tmp;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user