projects
/
oweals
/
cde.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dtprintinfo: Coverity 89561
[oweals/cde.git]
/
cde
/
programs
/
dtlogin
/
resource.c
diff --git
a/cde/programs/dtlogin/resource.c
b/cde/programs/dtlogin/resource.c
index 4314a6b4faa2c41a83a4a3d4f5463b49fafcc99f..6b63668964951d21dfc4567a16fb965b22e51f53 100644
(file)
--- a/
cde/programs/dtlogin/resource.c
+++ b/
cde/programs/dtlogin/resource.c
@@
-90,9
+90,6
@@
int langListTimeout;
#ifdef DEF_NETWORK_DEV
char *networkDev;
#endif
#ifdef DEF_NETWORK_DEV
char *networkDev;
#endif
-#if defined(__osf__)
-char *ignoreLocales;
-#endif
/*
* Dtlogin will accept both Dtlogin and XDM resources. The string variable
/*
* Dtlogin will accept both Dtlogin and XDM resources. The string variable
@@
-219,17
+216,8
@@
static char AppName[16] = DTLOGIN;
#endif
#ifndef DEF_LANG /* LANG default settings for various architectures */
#endif
#ifndef DEF_LANG /* LANG default settings for various architectures */
-# ifdef __apollo
-# define DEF_LANG "C"
-# endif
-# ifdef __osf__
-# define DEF_LANG "C"
-# endif
-# ifdef __hp_osf
-# define DEF_LANG "en_US.88591"
-# endif
# ifdef sun /* default language under Solaris */
# ifdef sun /* default language under Solaris */
-# define DEF_LANG "C"
+# define DEF_LANG "C"
# endif
#endif
# endif
#endif
@@
-290,10
+278,6
@@
struct dmResources {
"networkDevice","NetworkDevice",DM_STRING, &networkDev,
DEF_NETWORK_DEV,
#endif
"networkDevice","NetworkDevice",DM_STRING, &networkDev,
DEF_NETWORK_DEV,
#endif
-#if defined(__osf__)
-"ignoreLocales", "IgnoreLocales", DM_STRING, &ignoreLocales,
- "",
-#endif
};
# define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0])
};
# define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0])
@@
-409,6
+393,7
@@
GetResource( char *name, char *class, int valueType, char **valuep,
char *type;
XrmValue value;
char *string, *new_string;
char *type;
XrmValue value;
char *string, *new_string;
+ char empty[] = "";
char str_buf[50];
int len;
char str_buf[50];
int len;
@@
-422,8
+407,13
@@
GetResource( char *name, char *class, int valueType, char **valuep,
}
else
{
}
else
{
- string = default_value;
- len = (string == NULL ? 0 : strlen (string));
+ if(default_value) {
+ string = default_value;
+ len = strlen (string);
+ } else {
+ string = empty;
+ len = 0;
+ }
}
Debug ("%s/%s value %*.*s\n", name, class, len, len, string);
}
Debug ("%s/%s value %*.*s\n", name, class, len, len, string);
@@
-621,7
+611,7
@@
LoadDMResources( void )
keyFile = getFullFileName(keyFile, 0, NULL);
accessFile = getFullFileName(accessFile, 0, NULL);
keyFile = getFullFileName(keyFile, 0, NULL);
accessFile = getFullFileName(accessFile, 0, NULL);
-
#ifndef __apollo /* set a TZ default for all OS except Domain
*/
+
/* set a TZ default
*/
if (timeZone == NULL || strlen(timeZone) == 0)
{
/*
if (timeZone == NULL || strlen(timeZone) == 0)
{
/*
@@
-629,7
+619,6
@@
LoadDMResources( void )
*/
GetSysParms(&timeZone,0,0);
}
*/
GetSysParms(&timeZone,0,0);
}
-#endif
}
}