summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-06-04 17:01:05 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-06-11 19:04:23 +0700
commiteea286f2b9e4b1acf2b1c9800f5a4bc7c3fa968d (patch)
treedaacd41218387f2853ed0557ab9bfdda80e28eec
parentdd45b7d74696cd4fe9545852640a3c2e66a808fd (diff)
xwin: Get rid of xstrdup when argument is definitely non-NULL
ditto for XWin Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--hw/xwin/InitOutput.c6
-rwxr-xr-xhw/xwin/glx/indirect.c6
-rw-r--r--hw/xwin/winconfig.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 1ab059f72..1b976061c 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -441,7 +441,7 @@ winFixupPaths (void)
int comment_block = FALSE;
/* get defautl fontpath */
- char *fontpath = xstrdup(defaultFontPath);
+ char *fontpath = strdup(defaultFontPath);
size_t size = strlen(fontpath);
/* read all lines */
@@ -528,7 +528,7 @@ winFixupPaths (void)
/* cleanup */
fclose(fontdirs);
- defaultFontPath = xstrdup(fontpath);
+ defaultFontPath = strdup(fontpath);
free(fontpath);
changed_fontpath = TRUE;
font_from = X_CONFIG;
@@ -600,7 +600,7 @@ winFixupPaths (void)
}
}
- defaultFontPath = xstrdup(newfp);
+ defaultFontPath = strdup(newfp);
free(newfp);
changed_fontpath = TRUE;
}
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 5e0e917bc..8ec40da33 100755
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -676,7 +676,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
// Override the GL extensions string set by __glXScreenInit()
- screen->base.GLextensions = xstrdup(gl_extensions);
+ screen->base.GLextensions = strdup(gl_extensions);
// Generate the GLX extensions string (overrides that set by __glXScreenInit())
{
@@ -706,13 +706,13 @@ glxWinScreenProbe(ScreenPtr pScreen)
if (screen->has_WGL_ARB_multisample)
{
- screen->base.GLXversion = xstrdup("1.4");
+ screen->base.GLXversion = strdup("1.4");
screen->base.GLXmajor = 1;
screen->base.GLXminor = 4;
}
else
{
- screen->base.GLXversion = xstrdup("1.3");
+ screen->base.GLXversion = strdup("1.3");
screen->base.GLXmajor = 1;
screen->base.GLXminor = 3;
}
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index ab49aaa7a..a88b6f1cf 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -583,7 +583,7 @@ winConfigFiles ()
else if (filesptr != NULL && filesptr->file_fontpath)
{
from = X_CONFIG;
- defaultFontPath = xstrdup (filesptr->file_fontpath);
+ defaultFontPath = strdup (filesptr->file_fontpath);
}
winMsg (from, "FontPath set to \"%s\"\n", defaultFontPath);
@@ -630,7 +630,7 @@ winSetStrOption (pointer optlist, const char *name, char *deflt)
if (ParseOptionValue (-1, optlist, &o))
deflt = o.value.str;
if (deflt)
- return xstrdup (deflt);
+ return strdup (deflt);
else
return NULL;
}