Allow N_FIELDS to be 0.

llvm-svn: 93211
This commit is contained in:
Mike Stump 2010-01-12 00:28:59 +00:00
parent 4216615f99
commit ee6dfe55a5
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ void gs(int s) {
gl(" {");
/* Fields */
int n_fields = random() % (N_FIELDS*4);
int n_fields = N_FIELDS == 0 ? 0 : random() % (N_FIELDS*4);
// PARAM: 3/4 of all structs should have no members
if (n_fields >= N_FIELDS)
n_fields = 0;