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:
parent
8988daeece
commit
ed7efc04d8
|
@ -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 ) {
|
||||
Debug( 1, "Monitor %s has no zones, adding one.", name );
|
||||
n_zones = 1;
|
||||
|
@ -605,7 +606,6 @@ Monitor::~Monitor()
|
|||
memset( mem_ptr, 0, mem_size );
|
||||
}
|
||||
|
||||
if ( mem_ptr ) {
|
||||
#if ZM_MEM_MAPPED
|
||||
if ( msync( mem_ptr, mem_size, MS_SYNC ) < 0 )
|
||||
Error( "Can't msync: %s", strerror(errno) );
|
||||
|
|
Loading…
Reference in New Issue