X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_mutex_init.c;h=a7ba39baac06821a528cbd02f1b5a57e349c57d8;hb=e864ddc36819814b3b9ed17620459d66add512d3;hp=fb689271ce7affd0171368005ceebc03abcf6cff;hpb=400c5e5c8307a2ebe44ef1f203f5a15669f20347;p=musl diff --git a/src/thread/pthread_mutex_init.c b/src/thread/pthread_mutex_init.c index fb689271..a7ba39ba 100644 --- a/src/thread/pthread_mutex_init.c +++ b/src/thread/pthread_mutex_init.c @@ -2,7 +2,7 @@ int pthread_mutex_init(pthread_mutex_t *restrict m, const pthread_mutexattr_t *restrict a) { - memset(m, 0, sizeof *m); + *m = (pthread_mutex_t){0}; if (a) m->_m_type = *a & 7; return 0; }