summaryrefslogtreecommitdiff
path: root/bin/bbackupquery
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-11-13 15:58:53 +0000
committerChris Wilson <chris+github@qwirx.com>2006-11-13 15:58:53 +0000
commitb88ecaed60a79c3a06f513a353ea277788243004 (patch)
tree5e267e791836f9729673ed568ee938fff42a8408 /bin/bbackupquery
parente8c11ba2cee087b5da8e9758dbc3bdb3feec5ee7 (diff)
Setup MAINHELPER as early as possible, and clear it as late as possible,
for consistency (refs #3)
Diffstat (limited to 'bin/bbackupquery')
-rw-r--r--bin/bbackupquery/bbackupquery.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/bbackupquery/bbackupquery.cpp b/bin/bbackupquery/bbackupquery.cpp
index 4b836406..1a3b8f99 100644
--- a/bin/bbackupquery/bbackupquery.cpp
+++ b/bin/bbackupquery/bbackupquery.cpp
@@ -63,7 +63,10 @@ void PrintUsageAndExit()
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 @@ int main(int argc, const char *argv[])
BoxDebugTraceOn = false;
#endif
- int returnCode = 0;
-
- MAINHELPER_START
-
FILE *logFile = 0;
// Filename for configuraiton file?
@@ -314,13 +313,13 @@ int main(int argc, const char *argv[])
// Let everything be cleaned up on exit.
- MAINHELPER_END
-
#ifdef WIN32
// Clean up our sockets
WSACleanup();
#endif
+ MAINHELPER_END
+
return returnCode;
}