Use strchr, rather than index, which is a legacy function. From caf.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@318 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-08-14 07:22:32 +00:00
parent c0bc9294cd
commit 74f8a720c4

View File

@@ -1062,7 +1062,7 @@ static char *parse_args (char *argv[], int argc, char **envp)
if (!*realname && entry->pw_gecos && *(entry->pw_gecos)) if (!*realname && entry->pw_gecos && *(entry->pw_gecos))
{ {
#ifdef GECOS_DELIMITER #ifdef GECOS_DELIMITER
if ((ptr = index(entry->pw_gecos, GECOS_DELIMITER))) if ((ptr = strchr(entry->pw_gecos, GECOS_DELIMITER)))
*ptr = (char) 0; *ptr = (char) 0;
#endif #endif
if ((ptr = strchr(entry->pw_gecos, '&')) == NULL) if ((ptr = strchr(entry->pw_gecos, '&')) == NULL)