From 023509e8e5f1ad1f6a61cdec061d43e69a16ebc3 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 9 Apr 2008 19:52:13 +0000 Subject: Remove vestigial locking init from sprintf routines. --- libc/stdio/vsnprintf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'libc/stdio/vsnprintf.c') diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c index 4eef2c1a0..132959dcf 100644 --- a/libc/stdio/vsnprintf.c +++ b/libc/stdio/vsnprintf.c @@ -41,16 +41,13 @@ int vsnprintf(char *__restrict buf, size_t size, __INIT_MBSTATE(&(f.__state)); #endif /* __STDIO_MBSTATE */ -#ifdef __UCLIBC_HAS_THREADS__ - f.__user_locking = 1; /* Set user locking. */ - __stdio_init_mutex(&f.__lock); -#endif f.__nextopen = NULL; if (size > SIZE_MAX - (size_t) buf) { size = SIZE_MAX - (size_t) buf; } +/* TODO: this comment seems to be wrong */ /* Set these last since __bufputc initialization depends on * __user_locking and only gets set if user locking is on. */ f.__bufstart = (unsigned char *) buf; @@ -195,10 +192,6 @@ int vsnprintf(char *__restrict buf, size_t size, __INIT_MBSTATE(&(f.__state)); #endif /* __STDIO_MBSTATE */ -#ifdef __UCLIBC_HAS_THREADS__ - f.__user_locking = 1; /* Set user locking. */ - __stdio_init_mutex(&f.__lock); -#endif f.__nextopen = NULL; rv = _vfprintf_internal(&f, format, arg); -- cgit v1.2.3