From 0aec7c648b4017fd672f4f99c63eccc7606a8eb6 Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 24 Dec 2003 10:38:28 +0000 Subject: [PATCH] Modified return check from mmap call. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@714 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_local_camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_local_camera.cpp b/src/zm_local_camera.cpp index dcb6aea2b..9637b88d1 100644 --- a/src/zm_local_camera.cpp +++ b/src/zm_local_camera.cpp @@ -149,7 +149,7 @@ void LocalCamera::Initialise() } m_buffer = (unsigned char *)mmap(0, m_vmb.size, PROT_READ|PROT_WRITE, MAP_SHARED, m_videohandle,0); - if( !((long)m_buffer > 0) ) + if( m_buffer == MAP_FAILED ) { Error(( "Could not mmap video: %s", strerror(errno) )); exit(-1);