From 763125d1c74fe228a04cee4f76bf43f846065d4e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Feb 2000 20:12:40 +0000 Subject: Update. 2000-02-11 Ulrich Drepper * locale/nl_langinfo.c: Correct return value in error case. Don't set errno (PR libc/1582). --- locale/nl_langinfo.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'locale') diff --git a/locale/nl_langinfo.c b/locale/nl_langinfo.c index 4c8e6285d3..34772d3535 100644 --- a/locale/nl_langinfo.c +++ b/locale/nl_langinfo.c @@ -1,5 +1,5 @@ /* 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. 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; if (category < 0 || category >= LC_ALL) - { - /* Bogus category: bogus item. */ - __set_errno (EINVAL); - return NULL; - } + /* Bogus category: bogus item. */ + return ""; data = *_nl_current[category]; if (index >= data->nstrings) - { - /* Bogus index for this category: bogus item. */ - __set_errno (EINVAL); - return NULL; - } + /* Bogus index for this category: bogus item. */ + return ""; /* Return the string for the specified item. */ return (char *) data->values[index].string; -- cgit 1.4.1