Mercurial > nand-ecoscentric
changeset 3275:c568d113df01
* src/pthread.cxx (pthread_create): Include terminating NUL char
when initializing thread name from template. [ Bugzilla 1001743 ]
| author | jld |
|---|---|
| date | Tue, 05 Feb 2013 15:53:23 +0000 |
| parents | 376086cd0778 |
| children | 1151035b20da |
| files | packages/compat/posix/current/ChangeLog packages/compat/posix/current/src/pthread.cxx |
| diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/compat/posix/current/ChangeLog +++ b/packages/compat/posix/current/ChangeLog @@ -1,3 +1,8 @@ +2013-02-03 John Dallaway <john@dallaway.org.uk> + + * src/pthread.cxx (pthread_create): Include terminating NUL char + when initializing thread name from template. [ Bugzilla 1001743 ] + 2012-03-08 Sergei Gavrikov <sergei.gavrikov@gmail.com> * src/mqueue.cxx: Fix compiler warnings about variables that are set @@ -1122,7 +1127,7 @@ 2000-03-24 Nick Garnett <nickg@cygnus. ## ####GPLCOPYRIGHTBEGIN#### ## ------------------------------------------- ## This file is part of eCos, the Embedded Configurable Operating System. -## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2009 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2009, 2013 Free Software Foundation, Inc. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by
--- a/packages/compat/posix/current/src/pthread.cxx +++ b/packages/compat/posix/current/src/pthread.cxx @@ -8,7 +8,7 @@ // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2013 Free Software Foundation, Inc. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -596,7 +596,7 @@ externC int pthread_create ( pthread_t * static char *name_template = "pthread.00000000"; pthread_t id = nthread->id; - for( int i = 0; name_template[i]; i++ ) name[i] = name_template[i]; + for( int i = 0; ( name[i] = name_template[i] ); i++ ); // dump the id, in hex into the name. for( int i = 15; i >= 8; i-- )
