Package not found: openSUSE:Factory/libFS

File mouseemu.unregister_inputhandler.patch of Package mouseemu

---
 mouseemu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/mouseemu.c
+++ b/mouseemu.c
@@ -358,7 +358,7 @@ void unregister_inputhandler (int fd)
 			if (ihandler[n].grab)
 				ioctl(fd, EVIOCGRAB, 0);
 		}
-	if (found)
+	if (found && n < EVENT_DEVS)
 		ihandler[n].fd = -1;
 }
 
@@ -789,7 +789,7 @@ int main(int argc, char *argv[])
 			perror("mouseemu: can't open /var/run/mouseemu.pid");
 			exit(1);
 		}
-		fprintf(pidfile, "%d\n", pid);
+		fprintf(pidfile, "%d\n", getpid());
 		fclose(pidfile);
 
 		/*we start only after we received the first sigusr1 from child:*/
openSUSE Build Service is sponsored by