More sprintf -> PyOS_snprintf.

This commit is contained in:
Tim Peters 2001-11-28 22:07:30 +00:00
parent 179c48c60e
commit 75cdad5584
5 changed files with 14 additions and 9 deletions

View file

@ -123,7 +123,8 @@ long PyThread_start_new_thread( void (*func)(void *), void *arg )
/* We are so very thread-safe... */
this_thread = atomic_add( &thread_count, 1 );
sprintf( name, "python thread (%d)", this_thread );
PyOS_snprintf(name, sizeof(name),
"python thread (%d)", this_thread );
tid = spawn_thread( (thread_func)func, name,
B_NORMAL_PRIORITY, arg );
@ -222,7 +223,7 @@ PyThread_type_lock PyThread_allocate_lock( void )
}
this_lock = atomic_add( &lock_count, 1 );
sprintf( name, "python lock (%d)", this_lock );
PyOS_snprintf(name, sizeof(name), "python lock (%d)", this_lock);
retval = benaphore_create( name, lock );
if( retval != EOK ) {