From: Marek Olšák <[email protected]>
for C++ editors
---
src/egl/drivers/dri2/platform_wayland.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c
b/src/egl/drivers/dri2/platform_wayland.c
index dc6fcc1..ae33477 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1444,38 +1444,38 @@ create_tmpfile_cloexec(char *tmpname)
*
* If the C library implements posix_fallocate(), it is used to
* guarantee that disk space is available for the file at the
* given size. If disk space is insufficent, errno is set to ENOSPC.
* If posix_fallocate() is not supported, program may receive
* SIGBUS on accessing mmap()'ed file contents instead.
*/
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;
int ret;
path = getenv("XDG_RUNTIME_DIR");
if (!path) {
errno = ENOENT;
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);
free(name);
if (fd < 0)
return -1;
ret = ftruncate(fd, size);
if (ret < 0) {
--
2.7.4
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev