From ed7efc04d80eb2dc24506ae5c0720e7716cae20b Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 19 Aug 2014 09:11:49 -0400 Subject: [PATCH] spaces vs tabs are important in rules, debian is more picky than ubuntu fix placement of an if to prevent accessing unmapped mem_ptr --- src/zm_monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 2a54c4694..71e6b6e58 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -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) );