egl/dri2: don't use the template keyword
authorMarek Olšák <marek.olsak@amd.com>
Fri, 29 Sep 2017 20:31:21 +0000 (22:31 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 30 Sep 2017 17:03:07 +0000 (19:03 +0200)
for C++ editors

Reviewed-by: Brian Paul <brianp@vmware.com>
src/egl/drivers/dri2/platform_wayland.c

index dc6fcc1d0725c48113a577e7a2529963e33c7b14..ae3347756bc1a4629b69f2ea669d9dc8c5223e2a 100644 (file)
@@ -1451,7 +1451,7 @@ create_tmpfile_cloexec(char *tmpname)
 static int
 os_create_anonymous_file(off_t size)
 {
-   static const char template[] = "/mesa-shared-XXXXXX";
+   static const char templ[] = "/mesa-shared-XXXXXX";
    const char *path;
    char *name;
    int fd;
@@ -1463,12 +1463,12 @@ os_create_anonymous_file(off_t size)
       return -1;
    }
 
-   name = malloc(strlen(path) + sizeof(template));
+   name = malloc(strlen(path) + sizeof(templ));
    if (!name)
       return -1;
 
    strcpy(name, path);
-   strcat(name, template);
+   strcat(name, templ);
 
    fd = create_tmpfile_cloexec(name);