summaryrefslogtreecommitdiffstats
path: root/libbacktrace
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2014-01-29 12:49:39 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-29 12:49:39 +0000
commitcc98fd7eb2ba2cb6a763c31ea919bf86804012a7 (patch)
tree60733458703b0960da43d58aadc52543489c2262 /libbacktrace
parentf6b714ba6104315dd0c2a9bb17512e568c4e9527 (diff)
parentab2de41574d15bac8c3ef8f49cfba493ea501a0a (diff)
downloadsystem_core-cc98fd7eb2ba2cb6a763c31ea919bf86804012a7.zip
system_core-cc98fd7eb2ba2cb6a763c31ea919bf86804012a7.tar.gz
system_core-cc98fd7eb2ba2cb6a763c31ea919bf86804012a7.tar.bz2
am ab2de415: am 773c9ab7: am c96c2954: am a152ed73: Merge "Fix global pointing to local variable."
* commit 'ab2de41574d15bac8c3ef8f49cfba493ea501a0a': 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 {