File: gnulib-no-abort.diff

package info (click to toggle)
grub2 2.02%2Bdfsg1-20
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 61,784 kB
  • sloc: ansic: 384,086; asm: 16,323; sh: 13,230; cpp: 1,994; makefile: 1,488; python: 1,458; 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)