Actually return value from __cp_index

Fixes Coverty CID 153470

Also drop redundant declaration of __cp_index.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-10-22 21:08:44 +02:00
parent 5005be3daf
commit 8c6e4fec14
2 changed files with 1 additions and 4 deletions

View File

@ -470,9 +470,6 @@
_L, _L, _L, _L, _L, _L, _L _L, _L, _L, _L, _L, _L, _L
#define _CTYPE_PT154_255 _L #define _CTYPE_PT154_255 _L
extern int __cp_index (const char *charset_ext);
#if defined(ALLOW_NEGATIVE_CTYPE_INDEX) #if defined(ALLOW_NEGATIVE_CTYPE_INDEX)
#ifndef __CYGWIN__ #ifndef __CYGWIN__

View File

@ -786,7 +786,7 @@ __cp_val_index (int val)
int int
__cp_index (const char *charset_ext) __cp_index (const char *charset_ext)
{ {
int cp_idx = __cp_val_index (__micro_atoi (charset_ext)); return __cp_val_index (__micro_atoi (charset_ext));
} }
#endif /* _MB_EXTENDED_CHARSETS_WINDOWS */ #endif /* _MB_EXTENDED_CHARSETS_WINDOWS */