changeset 27964:f559fdc6fb96

Merge another if condition check to lessen differences to vo_fbdev.c.
author diego
date Sun, 23 Nov 2008 14:32:39 +0000
parents 55a3f6cf9784
children 1388c6a08a50
files libvo/vo_wii.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_wii.c	Sun Nov 23 14:15:54 2008 +0000
+++ b/libvo/vo_wii.c	Sun Nov 23 14:32:39 2008 +0000
@@ -210,10 +210,8 @@
   fb_line_len = fb_finfo.line_length;
   fb_size     = fb_finfo.smem_len;
   frame_buffer = NULL;
-
-  frame_buffer = (uint8_t *) mmap(0, fb_size, PROT_READ | PROT_WRITE,
-                                  MAP_SHARED, fb_dev_fd, 0);
-  if (frame_buffer == (uint8_t *) -1) {
+  if ((frame_buffer = (uint8_t *) mmap(0, fb_size, PROT_READ | PROT_WRITE,
+                                       MAP_SHARED, fb_dev_fd, 0)) == (uint8_t *) -1) {
     mp_msg(MSGT_VO, MSGL_ERR, "Can't mmap %s: %s\n", WII_DEV_NAME, strerror(errno));
     return 1;
   }