1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* intl/dcigettext.c (DCIGETTEXT): If _nl_find_msg returns -1 don't

look further, return original strings.
	(_nl_find_msg): Do not return found translation if the conversion
	failed.  Either signal the string is unusable or that something went
	wrong and the original should be used.

2006-06-21  Ulrich Drepper  <drepper@redhat.com>

	* string/_strerror.c (__strerror_r): Add __builtin_expect.
This commit is contained in:
Ulrich Drepper
2006-06-22 23:59:32 +00:00
parent f9b7a98b18
commit 4259230fd1
3 changed files with 52 additions and 21 deletions

View File

@ -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. */