[vlc-devel] commit: framebuffer: Remove pointless test ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Feb 11 16:52:50 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Feb 11 17:51:25 2009 +0200| [e86bc7ed04159cbe8ac5b9fb5f2cbc7d1c6001f6] | committer: Rémi Denis-Courmont
framebuffer: Remove pointless test
The error value for mmap() is MAP_FAILED, which is not nul. But we
check for that case in Open() anyway.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e86bc7ed04159cbe8ac5b9fb5f2cbc7d1c6001f6
---
modules/video_output/fb.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 602a888..eac3c2a 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -944,12 +944,9 @@ static int OpenDisplay( vout_thread_t *p_vout )
*****************************************************************************/
static void CloseDisplay( vout_thread_t *p_vout )
{
- if( p_vout->p_sys->p_video )
- {
- /* Clear display */
- memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
- munmap( p_vout->p_sys->p_video, p_vout->p_sys->i_page_size );
- }
+ /* Clear display */
+ memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
+ munmap( p_vout->p_sys->p_video, p_vout->p_sys->i_page_size );
if( p_vout->p_sys->i_fd >= 0 )
{
More information about the vlc-devel
mailing list