- switch(rand() % 4) {
- case 0:
- sprintf(buf,"%lld",(0LL + rand()) >> 20);
- break;
- case 1:
- sprintf(buf,"%lld",(0LL + rand()));
- break;
- case 2:
- sprintf(buf,"%lld",(0LL + rand()) << 20);
- break;
- case 3:
- randstring(buf,0,256);
- break;
- default:
- assert(NULL);
+ if (rand() % 2) {
+ buflen = randstring(buf,1,sizeof(buf)-1);
+ } else {
+ switch(rand() % 3) {
+ case 0:
+ buflen = sprintf(buf,"%lld",(0LL + rand()) >> 20);
+ break;
+ case 1:
+ buflen = sprintf(buf,"%lld",(0LL + rand()));
+ break;
+ case 2:
+ buflen = sprintf(buf,"%lld",(0LL + rand()) << 20);
+ break;
+ default:
+ assert(NULL);
+ }