@@ -459,7 +459,7 @@ int IMB_basic_input(struct comm_info* c_info, struct Bench** P_BList,
459459
460460 } else if (!strcmp ((* argv )[iarg ], "-iter_policy" )) {
461461 int ierr ;
462- char iter_policy [32 ];
462+ char iter_policy [IMB_INPUT_NAME_LEN ];
463463 if (iarg + 1 >= * argc ) {
464464 fprintf (stderr , "Missing argument after \"iter_policy\"\n" );
465465 ok = -1 ;
@@ -549,9 +549,9 @@ int IMB_basic_input(struct comm_info* c_info, struct Bench** P_BList,
549549 iarg_msg = iarg + 1 ;
550550
551551 if (t ) {
552- char inp_line [72 ];
552+ char inp_line [IMB_INPUT_ARG_LEN ];
553553
554- while (fgets (inp_line , 72 , t )) {
554+ while (fgets (inp_line , IMB_INPUT_ARG_LEN , t )) {
555555 if (inp_line [0 ] != '#' && strlen (inp_line ) > 1 )
556556 n_lens ++ ;
557557 }
@@ -574,17 +574,17 @@ int IMB_basic_input(struct comm_info* c_info, struct Bench** P_BList,
574574
575575
576576 if (t ) {
577- char inp_line [72 ], nam [ 32 ];
578- while (fgets (inp_line , 72 , t )) {
577+ char inp_line [IMB_INPUT_ARG_LEN ], name [ IMB_INPUT_NAME_LEN ];
578+ while (fgets (inp_line , IMB_INPUT_ARG_LEN , t )) {
579579 if (inp_line [0 ] != '#' && strlen (inp_line ) - 1 ) {
580- sscanf (inp_line , "%32s " , nam );
580+ sscanf (inp_line , "%31s[^\n] " , name );
581581 if (n_cases >= 1000 ) {
582582 fprintf (unit , "Too many benchmark cases\n" );
583583 fflush (stderr );
584584 ok = -1 ;
585585 break ;
586586 }
587- IMB_add_to_list_tail (nam , & Blist_head , & Blist_tail , & n_cases );
587+ IMB_add_to_list_tail (name , & Blist_head , & Blist_tail , & n_cases );
588588 }
589589 }
590590 fclose (t );
@@ -631,8 +631,8 @@ int IMB_basic_input(struct comm_info* c_info, struct Bench** P_BList,
631631 if ((min_log >= 0 ) &&
632632 (max_log > 0 ) &&
633633 (min_log < MAX_INT_LOG ) &&
634- (max_log < MAX_INT_LOG ) &&
635- (max_log > min_log )) {
634+ (max_log < MAX_INT_LOG ) &&
635+ (max_log > min_log )) {
636636 c_info -> min_msg_log = min_log ;
637637 c_info -> max_msg_log = max_log ;
638638 } else {
@@ -819,14 +819,14 @@ int IMB_basic_input(struct comm_info* c_info, struct Bench** P_BList,
819819 c_info -> n_lens = n_lens ;
820820
821821 if (t && n_lens > 0 ) {
822- char inp_line [72 ], S [72 ];
822+ char inp_line [IMB_INPUT_ARG_LEN ], S [IMB_INPUT_ARG_LEN ];
823823 int sz , isz ;
824824
825825 IMB_i_alloc (int , c_info -> msglen , n_lens , "Basic_Input" );
826826
827827 isz = -1 ;
828828
829- while (fgets (inp_line , 72 , t )) {
829+ while (fgets (inp_line , IMB_INPUT_ARG_LEN , t )) {
830830 S [0 ] = '\0' ;
831831 if (inp_line [0 ] != '#' && strlen (inp_line ) - 1 ) {
832832 int ierr ;
0 commit comments