[Mplayer-cvslog] CVS: main/libdha libdha.c,1.9,1.10

Alex Beregszaszi alex at mplayerhq.hu
Sun Feb 2 13:27:55 CET 2003


Update of /cvsroot/mplayer/main/libdha
In directory mail:/var/tmp.root/cvs-serv23903

Modified Files:
	libdha.c 
Log Message:
compiler warning fixes by Domink and some other changes by me

Index: libdha.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/libdha.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- libdha.c	19 Jan 2003 16:44:32 -0000	1.9
+++ libdha.c	2 Feb 2003 12:27:35 -0000	1.10
@@ -88,7 +88,9 @@
 #endif
 
 #ifdef CONFIG_DHAHELPER
+#ifdef CONFIG_SVGAHELPER
 dha_helper_way:
+#endif
   if ( (mem_fd = open("/dev/dhahelper",O_RDWR)) < 0)
   {
       perror("libdha: DHA kernelhelper failed");
@@ -118,22 +120,22 @@
   if ( (mem_fd = open(DEV_MEM,O_RDWR)) == -1)
   {
     perror("libdha: opening /dev/mem failed");
-    return -1;
+    return MAP_FAILED;
   }
 
 mmap:
   return mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,mem_fd,base);
 }
-#endif /* CONFIG_DHAHELPER */
+#endif /* Generic mmap (not win32, nor os2) */
 
 void unmap_phys_mem(void *ptr, unsigned long size)
 {
   int res = munmap(ptr,size);
 
-  if (res == -1)
+  if (res == (int)MAP_FAILED)
   {
       perror("libdha: unmapping memory failed");
-      return -1;
+      return;
   }
   
   close(mem_fd);



More information about the MPlayer-cvslog mailing list