[Box Backup-commit] COMMIT r1156 - box/chris/merge/bin/bbackupquery

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Mon Nov 13 15:58:53 GMT 2006


Author: chris
Date: 2006-11-13 15:58:53 +0000 (Mon, 13 Nov 2006)
New Revision: 1156

Modified:
   box/chris/merge/bin/bbackupquery/bbackupquery.cpp
Log:
Setup MAINHELPER as early as possible, and clear it as late as possible, 
for consistency (refs #3)


Modified: box/chris/merge/bin/bbackupquery/bbackupquery.cpp
===================================================================
--- box/chris/merge/bin/bbackupquery/bbackupquery.cpp	2006-11-13 15:57:20 UTC (rev 1155)
+++ box/chris/merge/bin/bbackupquery/bbackupquery.cpp	2006-11-13 15:58:53 UTC (rev 1156)
@@ -63,7 +63,10 @@
 
 int main(int argc, const char *argv[])
 {
+	int returnCode = 0;
+
 	MAINHELPER_SETUP_MEMORY_LEAK_EXIT_REPORT("bbackupquery.memleaks", "bbackupquery")
+	MAINHELPER_START
 
 #ifdef WIN32
 	WSADATA info;
@@ -83,10 +86,6 @@
 		BoxDebugTraceOn = false;
 	#endif
 	
-	int returnCode = 0;
-
-	MAINHELPER_START
-	
 	FILE *logFile = 0;
 
 	// Filename for configuraiton file?
@@ -314,13 +313,13 @@
 	
 	// Let everything be cleaned up on exit.
 	
-	MAINHELPER_END
-	
 #ifdef WIN32
 	// Clean up our sockets
 	WSACleanup();
 #endif
 
+	MAINHELPER_END
+	
 	return returnCode;
 }
 




More information about the Boxbackup-commit mailing list