Fix build on gcc2.

(Note, I honestly have no idea what was initially wrong with the code; everything seamt right to me..)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40676 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Saint-Pierre 2011-02-25 01:49:26 +00:00
parent 3a04b74922
commit 85b2f68b69

View File

@ -83,6 +83,7 @@ spawn_thread(thread_func entry, const char *name, int32 priority, void *data)
{
struct thread_creation_attributes attributes;
pthread_thread* thread;
thread_id id;
thread = __allocate_pthread(data);
if (thread == NULL)
@ -99,7 +100,7 @@ spawn_thread(thread_func entry, const char *name, int32 priority, void *data)
attributes.stack_address = NULL;
attributes.stack_size = 0;
thread_id id = _kern_spawn_thread(&attributes);
id = _kern_spawn_thread(&attributes);
if (id < 0)
free(thread);
else