Date: Mon, 8 Jun 2009 19:52:12 +0000 (UTC) From: Dag-Erling Smorgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r193741 - in stable/7/lib/libc: . gen Message-ID: <200906081952.n58JqCLi040920@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Mon Jun 8 19:52:12 2009 New Revision: 193741 URL: http://svn.freebsd.org/changeset/base/193741 Log: merge r174221: remove unnecessary casts Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/gen/closedir.c stable/7/lib/libc/gen/readdir.c stable/7/lib/libc/gen/seekdir.c stable/7/lib/libc/gen/telldir.c Modified: stable/7/lib/libc/gen/closedir.c ============================================================================== --- stable/7/lib/libc/gen/closedir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/closedir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -54,7 +54,7 @@ closedir(dirp) int fd; if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); _seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */ fd = dirp->dd_fd; dirp->dd_fd = -1; @@ -62,8 +62,8 @@ closedir(dirp) free((void *)dirp->dd_buf); _reclaim_telldir(dirp); if (__isthreaded) { - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); - _pthread_mutex_destroy((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); + _pthread_mutex_destroy(&dirp->dd_lock); } free((void *)dirp); return(_close(fd)); Modified: stable/7/lib/libc/gen/readdir.c ============================================================================== --- stable/7/lib/libc/gen/readdir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/readdir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -88,9 +88,9 @@ readdir(dirp) struct dirent *dp; if (__isthreaded) { - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); dp = _readdir_unlocked(dirp, 1); - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } else dp = _readdir_unlocked(dirp, 1); @@ -109,10 +109,10 @@ readdir_r(dirp, entry, result) saved_errno = errno; errno = 0; if (__isthreaded) { - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); if ((dp = _readdir_unlocked(dirp, 1)) != NULL) memcpy(entry, dp, _GENERIC_DIRSIZ(dp)); - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } else if ((dp = _readdir_unlocked(dirp, 1)) != NULL) memcpy(entry, dp, _GENERIC_DIRSIZ(dp)); Modified: stable/7/lib/libc/gen/seekdir.c ============================================================================== --- stable/7/lib/libc/gen/seekdir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/seekdir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -52,8 +52,8 @@ seekdir(dirp, loc) long loc; { if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); _seekdir(dirp, loc); if (__isthreaded) - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } Modified: stable/7/lib/libc/gen/telldir.c ============================================================================== --- stable/7/lib/libc/gen/telldir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/telldir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -64,13 +64,13 @@ telldir(dirp) if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL) return (-1); if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); lp->loc_index = dirp->dd_td->td_loccnt++; lp->loc_seek = dirp->dd_seek; lp->loc_loc = dirp->dd_loc; LIST_INSERT_HEAD(&dirp->dd_td->td_locq, lp, loc_lqe); if (__isthreaded) - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); return (lp->loc_index); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906081952.n58JqCLi040920>