summaryrefslogtreecommitdiff
path: root/synclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'synclient.c')
-rw-r--r--synclient.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/synclient.c b/synclient.c
index e12a5ce..43df589 100644
--- a/synclient.c
+++ b/synclient.c
@@ -4,6 +4,7 @@
#include <sys/ipc.h>
#include <sys/shm.h>
#include <unistd.h>
+#include <string.h>
#include <X11/Xdefs.h>
#include "synaptics.h"
@@ -25,6 +26,8 @@ int main()
SynapticsSHM *synshm;
int shmid;
SynapticsSHM old;
+ memset(&old, 0, sizeof(SynapticsSHM));
+ old.x = -1; /* Force first equality test to fail */
if((shmid = shmget(SHM_SYNAPTICS, sizeof(SynapticsSHM), 0)) == -1) {
if ((shmid = shmget(SHM_SYNAPTICS, 0, 0)) == -1) {