From 8526100eebf9c56ff6fac2b80938b232bb687946 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Mon, 11 Jan 2010 16:30:45 +0000 Subject: lib: thread history funcname shouldn't be constant, it's freed * thread.h: (struct cpu_thread_history.funcname) malloc gets called on this so it should not be const * thread.c: (cpu_record_print) cast the (const char *) to (char *), this function knows what it's doing (free wont be called on it). --- lib/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/thread.c') diff --git a/lib/thread.c b/lib/thread.c index e89af541..af52b057 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -303,7 +303,7 @@ cpu_record_print(struct vty *vty, thread_type filter) void *args[3] = {&tmp, vty, &filter}; memset(&tmp, 0, sizeof tmp); - tmp.funcname = "TOTAL"; + tmp.funcname = (char *)"TOTAL"; tmp.types = filter; #ifdef HAVE_RUSAGE -- cgit v1.2.3