summaryrefslogtreecommitdiffstats
path: root/libbacktrace
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2014-01-29 08:15:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-29 08:15:40 +0000
commitab2de41574d15bac8c3ef8f49cfba493ea501a0a (patch)
tree8c4d8fdadff966a8f5656378e9acf31485ab2fbc /libbacktrace
parentda0d5bd147dfd87280b1924abfc3650d5306448d (diff)
parent773c9ab74cc2e42f25fe16756e0b7a693b1d2cf5 (diff)
downloadsystem_core-ab2de41574d15bac8c3ef8f49cfba493ea501a0a.zip
system_core-ab2de41574d15bac8c3ef8f49cfba493ea501a0a.tar.gz
system_core-ab2de41574d15bac8c3ef8f49cfba493ea501a0a.tar.bz2
am 773c9ab7: am c96c2954: am a152ed73: Merge "Fix global pointing to local variable."
* commit '773c9ab74cc2e42f25fe16756e0b7a693b1d2cf5': Fix global pointing to local variable.
Diffstat (limited to 'libbacktrace')
-rw-r--r--libbacktrace/UnwindMap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbacktrace/UnwindMap.cpp b/libbacktrace/UnwindMap.cpp
index 9c8193b..03bb192 100644
--- a/libbacktrace/UnwindMap.cpp
+++ b/libbacktrace/UnwindMap.cpp
@@ -33,7 +33,7 @@
// of maps using the same map cursor.
//-------------------------------------------------------------------------
static pthread_mutex_t g_map_mutex = PTHREAD_MUTEX_INITIALIZER;
-static unw_map_cursor_t* g_map_cursor = NULL;
+static unw_map_cursor_t g_map_cursor;
static int g_map_references = 0;
UnwindMap::UnwindMap(pid_t pid) : BacktraceMap(pid) {
@@ -64,11 +64,11 @@ bool UnwindMap::Build() {
// Set the local address space to this cursor map.
unw_map_set(unw_local_addr_space, &map_cursor_);
g_map_references = 1;
- g_map_cursor = &map_cursor_;
+ g_map_cursor = map_cursor_;
}
} else {
g_map_references++;
- map_cursor_ = *g_map_cursor;
+ map_cursor_ = g_map_cursor;
}
pthread_mutex_unlock(&g_map_mutex);
} else {