mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-07 23:02:23 +00:00
Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
parent
3a9bb93dd1
commit
d2c42b1027
7 changed files with 20 additions and 32 deletions
|
|
@ -146,11 +146,8 @@ extmodSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
|||
for (i = 0; extensionModules[i].name != NULL; i++) {
|
||||
if (opts) {
|
||||
char *s;
|
||||
s = (char *)malloc(strlen(extensionModules[i].name) + 5);
|
||||
if (s) {
|
||||
if (Xasprinf(&s, "omit%s", extensionModules[i].name) != -1) {
|
||||
pointer o;
|
||||
strcpy(s, "omit");
|
||||
strcat(s, extensionModules[i].name);
|
||||
o = xf86FindOption(opts, s);
|
||||
free(s);
|
||||
if (o) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue