diff options
author | ache <ache@FreeBSD.org> | 2002-08-09 08:22:29 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2002-08-09 08:22:29 +0000 |
commit | 9d73d0dd122e2ce7df338d16beff65b7bbbc42c5 (patch) | |
tree | ec50b36d8d16a98023a55c6c494ff75a89b994db /lib/libc/locale/euc.c | |
parent | b11e88aa0eb39e0a14d792aeaf714fbbf091e7eb (diff) | |
download | FreeBSD-src-9d73d0dd122e2ce7df338d16beff65b7bbbc42c5.zip FreeBSD-src-9d73d0dd122e2ce7df338d16beff65b7bbbc42c5.tar.gz |
Add safeguards to never use errno == 0 as setrunelocale() error return code
Diffstat (limited to 'lib/libc/locale/euc.c')
-rw-r--r-- | lib/libc/locale/euc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/locale/euc.c b/lib/libc/locale/euc.c index 43194fa..596d107a 100644 --- a/lib/libc/locale/euc.c +++ b/lib/libc/locale/euc.c @@ -78,7 +78,7 @@ _EUC_init(rl) ++v; if ((ei = malloc(sizeof(_EucInfo))) == NULL) - return (ENOMEM); + return (errno == 0 ? ENOMEM : errno); new__mb_cur_max = 0; for (x = 0; x < 4; ++x) { |