File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1208,9 +1208,7 @@ static void cleanup_openssl(void)
1208
1208
1209
1209
int main (int argc, char *argv[])
1210
1210
{
1211
- struct benchmark_config cfg;
1212
-
1213
- memset (&cfg, 0 , sizeof (struct benchmark_config ));
1211
+ benchmark_config cfg = benchmark_config ();
1214
1212
cfg.arbitrary_commands = new arbitrary_command_list ();
1215
1213
1216
1214
if (config_parse_args (argc, argv, &cfg) < 0 ) {
Original file line number Diff line number Diff line change @@ -237,10 +237,10 @@ void object_generator::alloc_value_buffer(void)
237
237
assert (m_random_fd != -1 );
238
238
}
239
239
240
- char buf1[64 ];
241
- char buf2[64 ];
242
- int buf1_idx = sizeof (buf1);
243
- int buf2_idx = sizeof (buf2);
240
+ char buf1[64 ] = { 0 } ;
241
+ char buf2[64 ] = { 0 } ;
242
+ unsigned int buf1_idx = sizeof (buf1);
243
+ unsigned int buf2_idx = sizeof (buf2);
244
244
char *d = m_value_buffer;
245
245
int ret;
246
246
int iter = 0 ;
@@ -249,7 +249,7 @@ void object_generator::alloc_value_buffer(void)
249
249
if (buf1_idx == sizeof (buf1)) {
250
250
buf1_idx = 0 ;
251
251
buf2_idx++;
252
- if (buf2_idx = = sizeof (buf2)) {
252
+ if (buf2_idx > = sizeof (buf2)) {
253
253
iter++;
254
254
if (iter == 20 ) {
255
255
ret = read (m_random_fd, buf1, sizeof (buf1));
You can’t perform that action at this time.
0 commit comments