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)
12081208
12091209int main (int argc, char *argv[])
12101210{
1211- struct benchmark_config cfg;
1212-
1213- memset (&cfg, 0 , sizeof (struct benchmark_config ));
1211+ benchmark_config cfg = benchmark_config ();
12141212 cfg.arbitrary_commands = new arbitrary_command_list ();
12151213
12161214 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)
237237 assert (m_random_fd != -1 );
238238 }
239239
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);
244244 char *d = m_value_buffer;
245245 int ret;
246246 int iter = 0 ;
@@ -249,7 +249,7 @@ void object_generator::alloc_value_buffer(void)
249249 if (buf1_idx == sizeof (buf1)) {
250250 buf1_idx = 0 ;
251251 buf2_idx++;
252- if (buf2_idx = = sizeof (buf2)) {
252+ if (buf2_idx > = sizeof (buf2)) {
253253 iter++;
254254 if (iter == 20 ) {
255255 ret = read (m_random_fd, buf1, sizeof (buf1));
You can’t perform that action at this time.
0 commit comments