summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-07-28 21:23:25 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-07-28 21:23:25 +0200
commitb9d6d0309abdec7b384cb1f0958b9bcd60364e60 (patch)
tree1b428002615009976a2b982ab3642d448f183323
parent75300d6ae5a5b2324224423c9f976cba50e47547 (diff)
Do not return the address of a local buffer
Make the const buffer returned by FindDevice a static const buffer, to avoid letting be on the stack. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-rw-r--r--src/hurd_mouse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index 222c8ad..4dac225 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -171,7 +171,7 @@ OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
static const char *
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
{
- const char path[] = DEFAULT_MOUSE_DEV;
+ static const char path[] = DEFAULT_MOUSE_DEV;
int fd;
SYSCALL (fd = open(path, O_RDWR | O_NONBLOCK | O_EXCL));