spaces vs tabs are important in rules, debian is more picky than ubuntu

fix placement of an if to prevent accessing unmapped mem_ptr
This commit is contained in:
Isaac Connor 2014-08-19 09:11:49 -04:00 committed by Jan M. Hochstein
parent 8988daeece
commit ed7efc04d8
1 changed files with 1 additions and 1 deletions

View File

@ -425,6 +425,7 @@ Monitor::Monitor(
} }
} }
// Will this not happen everytime a monitor is instantiated? Seems like all the calls to the Monitor constructor pass a zero for n_zones, then load zones after..
if ( !n_zones ) { if ( !n_zones ) {
Debug( 1, "Monitor %s has no zones, adding one.", name ); Debug( 1, "Monitor %s has no zones, adding one.", name );
n_zones = 1; n_zones = 1;
@ -605,7 +606,6 @@ Monitor::~Monitor()
memset( mem_ptr, 0, mem_size ); memset( mem_ptr, 0, mem_size );
} }
if ( mem_ptr ) {
#if ZM_MEM_MAPPED #if ZM_MEM_MAPPED
if ( msync( mem_ptr, mem_size, MS_SYNC ) < 0 ) if ( msync( mem_ptr, mem_size, MS_SYNC ) < 0 )
Error( "Can't msync: %s", strerror(errno) ); Error( "Can't msync: %s", strerror(errno) );