File: gnulib-no-abort.diff

package info (click to toggle)
grub2 2.02~beta3-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 56,240 kB
  • ctags: 67,122
  • sloc: ansic: 378,393; asm: 16,268; sh: 13,167; cpp: 1,991; python: 1,458; makefile: 1,407; sed: 423; lex: 393; yacc: 267; awk: 75; lisp: 50; perl: 31
file content (30 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
=== modified file 'grub-core/gnulib/regcomp.c'
--- grub-core/gnulib/regcomp.c	2010-09-20 10:35:33 +0000
+++ grub-core/gnulib/regcomp.c	2012-03-10 11:31:42 +0000
@@ -549,13 +549,9 @@ regerror (int errcode, const regex_t *_R
   if (BE (errcode < 0
 	  || errcode >= (int) (sizeof (__re_error_msgid_idx)
 			       / sizeof (__re_error_msgid_idx[0])), 0))
-    /* Only error codes returned by the rest of the code should be passed
-       to this routine.  If we are given anything else, or if other regex
-       code generates an invalid error code, then the program has a bug.
-       Dump core so we can fix it.  */
-    abort ();
-
-  msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
+    msg = gettext ("unknown regexp error");
+  else
+    msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
 
   msg_size = strlen (msg) + 1; /* Includes the null.  */

@@ -1119,7 +1119,7 @@
 	}
 	break;
       default:
-	abort ();
+	break;
       }
 
   if (mb_chars || has_period)