mirror of git://sourceware.org/git/glibc.git
Update.
2000-02-11 Ulrich Drepper <drepper@redhat.com> * locale/nl_langinfo.c: Correct return value in error case. Don't set errno (PR libc/1582).
This commit is contained in:
parent
586599b500
commit
763125d1c7
|
|
@ -1,3 +1,8 @@
|
||||||
|
2000-02-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* locale/nl_langinfo.c: Correct return value in error case. Don't
|
||||||
|
set errno (PR libc/1582).
|
||||||
|
|
||||||
2000-02-02 Andreas Schwab <schwab@suse.de>
|
2000-02-02 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* malloc/Makefile (distribute): Add memprof.h.
|
* malloc/Makefile (distribute): Add memprof.h.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* User interface for extracting locale-dependent parameters.
|
/* User interface for extracting locale-dependent parameters.
|
||||||
Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
@ -34,20 +34,14 @@ nl_langinfo (item)
|
||||||
const struct locale_data *data;
|
const struct locale_data *data;
|
||||||
|
|
||||||
if (category < 0 || category >= LC_ALL)
|
if (category < 0 || category >= LC_ALL)
|
||||||
{
|
|
||||||
/* Bogus category: bogus item. */
|
/* Bogus category: bogus item. */
|
||||||
__set_errno (EINVAL);
|
return "";
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
data = *_nl_current[category];
|
data = *_nl_current[category];
|
||||||
|
|
||||||
if (index >= data->nstrings)
|
if (index >= data->nstrings)
|
||||||
{
|
|
||||||
/* Bogus index for this category: bogus item. */
|
/* Bogus index for this category: bogus item. */
|
||||||
__set_errno (EINVAL);
|
return "";
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return the string for the specified item. */
|
/* Return the string for the specified item. */
|
||||||
return (char *) data->values[index].string;
|
return (char *) data->values[index].string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue