Revision
461
Author
wsiegrist@apple.com
Date
2009-01-13 16:07:16 -0800 (Tue, 13 Jan 2009)

Log Message

Make the depot fd default to -1 to avoid using it uninitialized in Depot::lock()

Modified Paths

Diff

Modified: branches/PR-6493844/darwinup/Depot.cpp (460 => 461)


--- branches/PR-6493844/darwinup/Depot.cpp	2009-01-13 23:59:11 UTC (rev 460)
+++ branches/PR-6493844/darwinup/Depot.cpp	2009-01-14 00:07:16 UTC (rev 461)
@@ -50,6 +50,8 @@
 }
 
 Depot::Depot(const char* prefix) {
+	m_lock_fd = -1;
+
 	asprintf(&m_depot_path,    "%s/.DarwinDepot",  prefix);
 	asprintf(&m_database_path, "%s/Database-V100", m_depot_path);
 	asprintf(&m_archives_path, "%s/Archives",      m_depot_path);