Explorar el Código

* fixed valgrind issues

peter hace 21 años
padre
commit
1cf9137930
Se han modificado 2 ficheros con 10 adiciones y 12 borrados
  1. 5 2
      rtl/unix/gpm.pp
  2. 5 10
      rtl/unix/mouse.pp

+ 5 - 2
rtl/unix/gpm.pp

@@ -909,7 +909,7 @@ var conn:Tgpm_connect;
     i:longint;
 
 begin
-  conn.pid:=0; { this signals a request }
+  fillchar(conn,sizeof(conn),0);
   if eptr<>nil then
     conn.vc:=GPM_REQ_SNAPSHOT
   else
@@ -954,7 +954,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.11  2004-11-02 09:37:35  peter
+  Revision 1.12  2004-11-03 16:51:05  peter
+    * fixed valgrind issues
+
+  Revision 1.11  2004/11/02 09:37:35  peter
     * fixed uninitialzied local
 
   Revision 1.10  2004/07/09 23:10:14  peter

+ 5 - 10
rtl/unix/mouse.pp

@@ -190,7 +190,6 @@ function SysDetectMouse:byte;
 {$ifndef NOGPM}
 var
   x : longint;
-  e : TGPMEvent;
   connect : TGPMConnect;
 {$endif ndef NOGPM}
 begin
@@ -210,14 +209,7 @@ begin
     end;
 { always a mouse deamon present }
   if gpm_fs<>-1 then
-    begin
-      x:=Gpm_GetSnapshot(e);
-      GPMEvent2MouseEvent(e,SysLastMouseEvent);
-      if x<>-1 then
-        SysDetectMouse:=x
-      else
-        SysDetectMouse:=2;
-    end
+    SysDetectMouse:=Gpm_GetSnapshot(nil)
   else
     SysDetectMouse:=0;
 {$else ifdef NOGPM}
@@ -434,7 +426,10 @@ end.
 
 {
   $Log$
-  Revision 1.12  2003-10-24 18:09:56  marco
+  Revision 1.13  2004-11-03 16:51:05  peter
+    * fixed valgrind issues
+
+  Revision 1.12  2003/10/24 18:09:56  marco
    * 1.0.x fixes merged
 
   Revision 1.11  2003/09/16 16:13:56  marco