mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtlogin: resolve 8 compiler warnings.
This commit is contained in:
parent
61e925f3c5
commit
c768260785
4 changed files with 14 additions and 17 deletions
|
|
@ -93,9 +93,7 @@ static char * makeEnv(
|
|||
static SIGVAL MakeLangAbort(
|
||||
int arg );
|
||||
|
||||
static int MatchesFileSuffix(
|
||||
char * filename,
|
||||
char * suffix );
|
||||
static int MatchesFileSuffix(const char *filename, const char *suffix);
|
||||
|
||||
static void ScanNLSDir(
|
||||
char * dirname );
|
||||
|
|
@ -676,23 +674,22 @@ MakeLangList( void )
|
|||
|
||||
|
||||
static int
|
||||
MatchesFileSuffix(char *filename, char *suffix)
|
||||
MatchesFileSuffix(const char *filename, const char *suffix)
|
||||
{
|
||||
int retval = 0;
|
||||
#if defined(_AIX) || defined(SVR4) || defined (__osf__) || defined(linux) || \
|
||||
defined(CSRG_BASED)
|
||||
char *pch;
|
||||
int different = 1;
|
||||
|
||||
/*
|
||||
* The assumption here is that the use of strrstr is
|
||||
* to determine if "dp->d_name" ends in ".cat".
|
||||
*/
|
||||
pch = filename;
|
||||
if ((int) strlen(filename) >= (int) strlen(suffix))
|
||||
pch = (char *)
|
||||
strcmp(filename + (strlen(filename) - strlen (suffix)), suffix);
|
||||
if (strlen(filename) >= strlen(suffix)) {
|
||||
different = strcmp(filename + (strlen(filename) - strlen (suffix)), suffix);
|
||||
}
|
||||
|
||||
return (pch == NULL);
|
||||
return (different == 0);
|
||||
#else
|
||||
return (strrstr(filename, suffix) != NULL);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue