apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/locks/unix proc_mutex.c
Date Mon, 14 Jun 2004 10:59:17 GMT
jorton      2004/06/14 03:59:17

  Modified:    locks/unix proc_mutex.c
  Log:
  * locks/unix/proc_mutex.c (apr_proc_mutex_lockfile): Avoid unnecessary
  strcmp calls.
  
  Revision  Changes    Path
  1.45      +4 -5      apr/locks/unix/proc_mutex.c
  
  Index: proc_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/proc_mutex.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -d -w -u -r1.44 -r1.45
  --- proc_mutex.c	14 Jun 2004 09:41:04 -0000	1.44
  +++ proc_mutex.c	14 Jun 2004 10:59:17 -0000	1.45
  @@ -815,11 +815,10 @@
   
   APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)
   {
  -    /* posix sems use the fname field but don't use a file,
  -     * so be careful 
  -     */
  -    if (!strcmp(mutex->meth->name, "flock") ||
  -        !strcmp(mutex->meth->name, "fcntl")) {
  +    /* POSIX sems use the fname field but don't use a file,
  +     * so be careful. */
  +    if (mutex->meth == &mutex_flock_methods
  +        || mutex->meth == &mutex_fcntl_methods) {
           return mutex->fname;
       }
       return NULL;
  
  
  

Mime
View raw message