freemyipod r210 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r209‎ | r210 | r211 >
Date:17:40, 7 September 2010
Author:theseven
Status:new
Tags:
Comment:
Make sure the ftl_initialized variable is initialized to false
Modified paths:
  • /embios/trunk/target/ipodnano2g/ftl.c (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano2g/ftl.c
@@ -431,7 +431,7 @@
432432
433433
434434 static struct mutex ftl_mtx;
435 -bool ftl_initialized;
 435+bool ftl_initialized = false;
436436
437437
438438
@@ -2517,6 +2517,7 @@
25182518 which will return immediately if everything was already clean. */
25192519 uint32_t ftl_init(void)
25202520 {
 2521+ if (ftl_initialized) return 0;
25212522 mutex_init(&ftl_mtx);
25222523 uint32_t i;
25232524 uint32_t result = 0;