about summary refs log tree commit diff
path: root/string/_strerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/_strerror.c')
-rw-r--r--string/_strerror.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/string/_strerror.c b/string/_strerror.c
index f6f16ff2af..cb5d9e3609 100644
--- a/string/_strerror.c
+++ b/string/_strerror.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,93,95,96,97,98,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,93,95,96,97,98,2000,2002,2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -35,8 +36,8 @@
 char *
 __strerror_r (int errnum, char *buf, size_t buflen)
 {
-  if (errnum < 0 || errnum >= _sys_nerr_internal
-      || _sys_errlist_internal[errnum] == NULL)
+  if (__builtin_expect (errnum < 0 || errnum >= _sys_nerr_internal
+			|| _sys_errlist_internal[errnum] == NULL, 0))
     {
       /* Buffer we use to print the number in.  For a maximum size for
 	 `int' of 8 bytes we never need more than 20 digits.  */