From efd4d87aa472523b07889af69874259db43b3c3c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 8 Nov 2012 17:04:20 -0500 Subject: clean up sloppy nested inclusion from pthread_impl.h this mirrors the stdio_impl.h cleanup. one header which is not strictly needed, errno.h, is left in pthread_impl.h, because since pthread functions return their error codes rather than using errno, nearly every single pthread function needs the errno constants. in a few places, rather than bringing in string.h to use memset, the memset was replaced by direct assignment. this seems to generate much better code anyway, and makes many functions which were previously non-leaf functions into leaf functions (possibly eliminating a great deal of bloat on some platforms where non-leaf functions require ugly prologue and/or epilogue). --- src/thread/pthread_cond_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/thread/pthread_cond_init.c') diff --git a/src/thread/pthread_cond_init.c b/src/thread/pthread_cond_init.c index 2eac30f1..71489bca 100644 --- a/src/thread/pthread_cond_init.c +++ b/src/thread/pthread_cond_init.c @@ -2,7 +2,7 @@ int pthread_cond_init(pthread_cond_t *restrict c, const pthread_condattr_t *restrict a) { - memset(c, 0, sizeof *c); + *c = (pthread_cond_t){0}; if (a) { c->_c_clock = *a & 0x7fffffff; if (*a>>31) c->_c_mutex = (void *)-1; -- cgit v1.2.1