# HG changeset patch # User John W. Eaton # Date 1211315090 14400 # Node ID d3a7882fa0b34b69705855b3c9e623a65ab917b4 # Parent e8394097d66f5b37bbae26e6e814efac8ea7ba12 style fixes diff -r e8394097d66f -r d3a7882fa0b3 liboctave/regex-match.cc --- a/liboctave/regex-match.cc Tue May 20 16:22:30 2008 -0400 +++ b/liboctave/regex-match.cc Tue May 20 16:24:50 2008 -0400 @@ -93,21 +93,24 @@ compiled = new regex_t [npat]; for (i = 0; i < npat; i++) - if (err = regcomp (compiled + i, pat(i).c_str (), - (REG_NOSUB | REG_EXTENDED | - (case_insen ? REG_ICASE : 0)))) - break; + { + err = regcomp (compiled + i, pat(i).c_str (), + (REG_NOSUB | REG_EXTENDED | + (case_insen ? REG_ICASE : 0))); + if (err) + break; + } if (err) { - int len = regerror(err, compiled + i, 0, 0); + int len = regerror (err, compiled + i, 0, 0); OCTAVE_LOCAL_BUFFER (char, errmsg, len); regerror(err, compiled + i, errmsg, len); (*current_liboctave_error_handler) ("%s in pattern (%s)", errmsg, pat(i).c_str()); for (int j = 0; j < i + 1; j++) - regfree(compiled + j); + regfree (compiled + j); } #else (*current_liboctave_error_handler) @@ -124,7 +127,7 @@ const char *str = s.c_str (); for (int i = 0; i < npat; i++) - if (regexec(compiled + i, str, 0, 0, 0) == 0) + if (regexec (compiled + i, str, 0, 0, 0) == 0) return true; #endif