gnulib-no-abort.diff 1003 B

12345678910111213141516171819202122232425262728293031
  1. === modified file 'grub-core/gnulib/regcomp.c'
  2. --- grub-core/gnulib/regcomp.c 2010-09-20 10:35:33 +0000
  3. +++ grub-core/gnulib/regcomp.c 2012-03-10 11:31:42 +0000
  4. @@ -549,13 +549,9 @@ regerror (int errcode, const regex_t *_R
  5. if (BE (errcode < 0
  6. || errcode >= (int) (sizeof (__re_error_msgid_idx)
  7. / sizeof (__re_error_msgid_idx[0])), 0))
  8. - /* Only error codes returned by the rest of the code should be passed
  9. - to this routine. If we are given anything else, or if other regex
  10. - code generates an invalid error code, then the program has a bug.
  11. - Dump core so we can fix it. */
  12. - abort ();
  13. -
  14. - msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
  15. + msg = gettext ("unknown regexp error");
  16. + else
  17. + msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
  18. msg_size = strlen (msg) + 1; /* Includes the null. */
  19. @@ -1119,7 +1119,7 @@
  20. }
  21. break;
  22. default:
  23. - abort ();
  24. + break;
  25. }
  26. if (mb_chars || has_period)