for (hosts = hostAddrdb; hosts; hosts = hosts->next)
{
if (hosts->type == QUERY)
- XdmcpFlush (socketFD, &directBuffer, hosts->addr, hosts->addrlen);
+ XdmcpFlush (socketFD, &directBuffer, (XdmcpNetaddr) hosts->addr, hosts->addrlen);
else
- XdmcpFlush (socketFD, &broadcastBuffer, hosts->addr, hosts->addrlen);
+ XdmcpFlush (socketFD, &broadcastBuffer, (XdmcpNetaddr) hosts->addr, hosts->addrlen);
}
if (++pingTry < TRIES)
XtAddTimeOut (PING_INTERVAL, PingHosts, (XtPointer) 0);
int addrlen;
addrlen = sizeof (addr);
- if (!XdmcpFill (socketFD, &buffer, &addr, &addrlen))
+ if (!XdmcpFill (socketFD, &buffer, (XdmcpNetaddr) &addr, &addrlen))
return;
if (!XdmcpReadHeader (&buffer, &header))
return;
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 );
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
session_selected = True;
- switch ( (int) client_data) {
+ switch ( (long) client_data) {
case OB_RESTART_SERVER:
CleanupAndExit(NULL, NOTIFY_RESTART);
if (NULL != langenv)
{
nl_fd = catopen(NLS_CATALOG, NL_CAT_LOCALE);
- if (0 > (int) nl_fd)
+ if (0 > (long) nl_fd)
LogError((unsigned char*) MC_DEF_LOG_NO_MSGCAT, langenv);
}
}
ReadCatalog(int setn, int msgn, char *dflt)
{
OpenCatalog();
- if ((0 > (int) nl_fd) || (NULL == langenv))
+ if ((0 > (long) nl_fd) || (NULL == langenv))
return (unsigned char*) dflt;
else
return (unsigned char*) catgets(nl_fd, setn, msgn, dflt);
ReadCatalogXms(int setn, int msgn, char *dflt)
{
OpenCatalog();
- if (0 > (int) nl_fd)
+ if (0 > (long) nl_fd)
return XmStringCreateLocalized(dflt);
else
return XmStringCreateLocalized((char*) ReadCatalog(setn, msgn, dflt));