diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-04 16:58:58 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-11 19:04:23 +0700 |
commit | 6592db6bb526f0c43b4c7b55859c629709e039b4 (patch) | |
tree | 30d525b635170a94193c0a8837e1b36b609e757e /glx/glxscreens.c | |
parent | 620ca54aaa0b363fcf68cec1bd6c37e68c988352 (diff) |
Get rid of xstrdup when argument is definitely non-NULL
Replace xstrdup with strdup when either constant string is
being duplicated or argument is guarded by conditionals and
obviously can't be NULL
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'glx/glxscreens.c')
-rw-r--r-- | glx/glxscreens.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/glx/glxscreens.c b/glx/glxscreens.c index a5b61df9f..8515e14d5 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -356,9 +356,9 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) return; pGlxScreen->pScreen = pScreen; - pGlxScreen->GLextensions = xstrdup(GLServerExtensions); - pGlxScreen->GLXvendor = xstrdup(GLXServerVendorName); - pGlxScreen->GLXextensions = xstrdup(GLXServerExtensions); + pGlxScreen->GLextensions = strdup(GLServerExtensions); + pGlxScreen->GLXvendor = strdup(GLXServerVendorName); + pGlxScreen->GLXextensions = strdup(GLXServerExtensions); /* All GLX providers must support all of the functionality required for at * least GLX 1.2. If the provider supports a higher version, the GLXminor |