From 84b27b559dac866588ee23920b930d5c58684815 Mon Sep 17 00:00:00 2001
From: Brian Norris <banorris@uci.edu>
Date: Thu, 14 Jun 2012 09:28:15 -0700
Subject: [PATCH] snapshot: don't put entire if (...) on one line

It's harder to read the failure conditions if you put if (...) and the
following statement all on one line.
---
 snapshot.cc | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/snapshot.cc b/snapshot.cc
index 01811ca8..9a69a4b3 100644
--- a/snapshot.cc
+++ b/snapshot.cc
@@ -104,12 +104,16 @@ static void HandlePF( int sig, siginfo_t *si, void * unused){
 void createSharedLibrary(){
 #if !USE_MPROTECT_SNAPSHOT
 	//step 1. create shared memory.
-	if( sTheRecord ) return;
+	if ( sTheRecord )
+		return;
 	int fd = shm_open( "/ModelChecker-Snapshotter", O_RDWR | O_CREAT, 0777 ); //universal permissions.
-	if( -1 == fd ) FAILURE("shm_open");
-	if( -1 == ftruncate( fd, SHARED_MEMORY_DEFAULT + STACK_SIZE_DEFAULT ) ) FAILURE( "ftruncate" );
+	if ( -1 == fd )
+		FAILURE("shm_open");
+	if ( -1 == ftruncate( fd, SHARED_MEMORY_DEFAULT + STACK_SIZE_DEFAULT ) )
+		FAILURE( "ftruncate" );
 	void * memMapBase = mmap( 0, SHARED_MEMORY_DEFAULT + STACK_SIZE_DEFAULT, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
-	if( MAP_FAILED == memMapBase ) FAILURE("mmap");
+	if( MAP_FAILED == memMapBase )
+		FAILURE("mmap");
 	sTheRecord = ( struct Snapshot * )memMapBase;
 	sTheRecord->mSharedMemoryBase = (void *)((uintptr_t)memMapBase + sizeof(struct Snapshot));
 	sTheRecord->mStackBase = (void *)((uintptr_t)memMapBase + SHARED_MEMORY_DEFAULT);
-- 
2.34.1