From 1adaf58e1fbf535ef459142ba96954c28f631678 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 12 Sep 2008 09:33:59 +0000 Subject: [PATCH] gcc4 noticed GenericThread::GetName() was returning a pointer to a local variable. No code is using this function, so it's safe to strdup() it. This class needs a serious restyling, though, as it doesn't conform to our coding guidelines git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27442 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/expander/GenericThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/expander/GenericThread.cpp b/src/apps/expander/GenericThread.cpp index 5130499c57..c108439364 100644 --- a/src/apps/expander/GenericThread.cpp +++ b/src/apps/expander/GenericThread.cpp @@ -313,7 +313,7 @@ GenericThread::GetName(void) { thread_info t_thread_info; GetInfo(& t_thread_info); - return (t_thread_info.name); + return strdup(t_thread_info.name); } thread_state