@@ -299,16 +299,18 @@ void darshan_parse_config_env(struct darshan_config *cfg)
299299 continue ;
300300 }
301301 ret = regcomp (& regex -> regex , token , REG_EXTENDED );
302- if (ret )
302+ if (!ret )
303+ {
304+ LL_APPEND (cfg -> app_exclusion_list , regex );
305+ }
306+ else
303307 {
304308 darshan_core_fprintf (stderr , "darshan library warning: " \
305309 "unable to compile Darshan config DARSHAN_APP_EXCLUDE " \
306310 "regex %s\n" , token );
307311 free (regex -> regex_str );
308312 free (regex );
309- continue ;
310313 }
311- LL_APPEND (cfg -> app_exclusion_list , regex );
312314 }
313315 token = strtok (NULL , "," );
314316 }
@@ -332,16 +334,18 @@ void darshan_parse_config_env(struct darshan_config *cfg)
332334 continue ;
333335 }
334336 ret = regcomp (& regex -> regex , token , REG_EXTENDED );
335- if (ret )
337+ if (!ret )
338+ {
339+ LL_APPEND (cfg -> app_inclusion_list , regex );
340+ }
341+ else
336342 {
337343 darshan_core_fprintf (stderr , "darshan library warning: " \
338344 "unable to compile Darshan config DARSHAN_APP_INCLUDE " \
339345 "regex %s\n" , token );
340346 free (regex -> regex_str );
341347 free (regex );
342- continue ;
343348 }
344- LL_APPEND (cfg -> app_inclusion_list , regex );
345349 }
346350 token = strtok (NULL , "," );
347351 }
@@ -578,16 +582,18 @@ void darshan_parse_config_file(struct darshan_config *cfg)
578582 break ;
579583 }
580584 ret = regcomp (& regex -> regex , token , REG_EXTENDED );
581- if (ret )
585+ if (!ret )
586+ {
587+ LL_APPEND (cfg -> app_exclusion_list , regex );
588+ }
589+ else
582590 {
583591 darshan_core_fprintf (stderr , "darshan library warning: " \
584592 "unable to compile Darshan config %s regex %s\n" ,
585593 key , token );
586594 free (regex -> regex_str );
587595 free (regex );
588- continue ;
589596 }
590- LL_APPEND (cfg -> app_exclusion_list , regex );
591597 token = strtok (NULL , "," );
592598 }
593599 }
@@ -609,16 +615,18 @@ void darshan_parse_config_file(struct darshan_config *cfg)
609615 break ;
610616 }
611617 ret = regcomp (& regex -> regex , token , REG_EXTENDED );
612- if (ret )
618+ if (!ret )
619+ {
620+ LL_APPEND (cfg -> app_inclusion_list , regex );
621+ }
622+ else
613623 {
614624 darshan_core_fprintf (stderr , "darshan library warning: " \
615625 "unable to compile Darshan config %s regex %s\n" ,
616626 key , token );
617627 free (regex -> regex_str );
618628 free (regex );
619- continue ;
620629 }
621- LL_APPEND (cfg -> app_inclusion_list , regex );
622630 token = strtok (NULL , "," );
623631 }
624632 }
@@ -723,16 +731,18 @@ void darshan_parse_config_file(struct darshan_config *cfg)
723731 }
724732 regex -> mod_flags = tmp_mod_flags ;
725733 ret = regcomp (& regex -> regex , token , REG_EXTENDED );
726- if (ret )
734+ if (!ret )
735+ {
736+ LL_APPEND (cfg -> rec_exclusion_list , regex );
737+ }
738+ else
727739 {
728740 darshan_core_fprintf (stderr , "darshan library warning: " \
729741 "unable to compile Darshan config %s regex %s\n" ,
730742 key , token );
731743 free (regex -> regex_str );
732744 free (regex );
733- continue ;
734745 }
735- LL_APPEND (cfg -> rec_exclusion_list , regex );
736746 token = strtok (NULL , "," );
737747 }
738748 }
@@ -760,16 +770,18 @@ void darshan_parse_config_file(struct darshan_config *cfg)
760770 }
761771 regex -> mod_flags = tmp_mod_flags ;
762772 ret = regcomp (& regex -> regex , token , REG_EXTENDED );
763- if (ret )
773+ if (!ret )
774+ {
775+ LL_APPEND (cfg -> rec_inclusion_list , regex );
776+ }
777+ else
764778 {
765779 darshan_core_fprintf (stderr , "darshan library warning: " \
766780 "unable to compile Darshan config %s regex %s\n" ,
767781 key , token );
768782 free (regex -> regex_str );
769783 free (regex );
770- continue ;
771784 }
772- LL_APPEND (cfg -> rec_inclusion_list , regex );
773785 token = strtok (NULL , "," );
774786 }
775787 }
0 commit comments