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>
This commit is contained in:
Mikhail Gusarov 2010-06-04 16:58:58 +07:00
commit 6592db6bb5
8 changed files with 26 additions and 26 deletions

View file

@ -2433,7 +2433,7 @@ int __glXDisp_ClientInfo(__GLXclientState *cl, GLbyte *pc)
cl->GLClientminorVersion = req->minor;
free(cl->GLClientextensions);
buf = (const char *)(req+1);
cl->GLClientextensions = xstrdup(buf);
cl->GLClientextensions = strdup(buf);
return Success;
}