aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Font.c54
1 files changed, 24 insertions, 30 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c
index 8c1cb7269..6fb6c8f35 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c
@@ -1433,45 +1433,39 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size)
void nxagentVerifySingleFontPath(char **dest, const char *fontDir)
{
- struct stat dirStat;
-
if (!dest || !*dest)
return;
- if (stat(fontDir, &dirStat) == 0 &&
- S_ISDIR(dirStat.st_mode) != 0)
- {
- #ifdef TEST
- fprintf(stderr, "%s: Assuming fonts in directory [%s].\n", __func__,
- validateString(fontDir));
- #endif
+ #ifdef TEST
+ fprintf(stderr, "%s: Assuming fonts in directory [%s].\n", __func__,
+ validateString(fontDir));
+ #endif
- for (int i = 0; ; i++)
- {
- char *tmppath = NULL;
- int rc;
+ for (int i = 0; ; i++)
+ {
+ char *tmppath = NULL;
+ int rc;
- const char *subdir = nxagentFontSubdirs[i];
+ const char *subdir = nxagentFontSubdirs[i];
- if (subdir == NULL)
- return;
+ if (subdir == NULL)
+ return;
- if (**dest != '\0')
- {
- rc = asprintf(&tmppath, "%s,%s/%s", *dest, fontDir, subdir);
- }
- else
- {
- rc = asprintf(&tmppath, "%s/%s", fontDir, subdir);
- }
+ if (**dest != '\0')
+ {
+ rc = asprintf(&tmppath, "%s,%s/%s", *dest, fontDir, subdir);
+ }
+ else
+ {
+ rc = asprintf(&tmppath, "%s/%s", fontDir, subdir);
+ }
- if (rc == -1)
- return;
+ if (rc == -1)
+ return;
- free(*dest);
- *dest = tmppath;
- tmppath = NULL;
- }
+ free(*dest);
+ *dest = tmppath;
+ tmppath = NULL;
}
}