diff options
author | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2004-06-14 10:59:17 +0000 |
---|---|---|
committer | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2004-06-14 10:59:17 +0000 |
commit | ccd75c9a6e244b1424fc250e49ead8c508f285ed (patch) | |
tree | f9478d725723ded0af635a29cdf61e004f4e8d23 | |
parent | 5976343e03a4ea4d892726ed5ba5ee601a3b79c4 (diff) | |
download | libapr-ccd75c9a6e244b1424fc250e49ead8c508f285ed.tar.gz |
* locks/unix/proc_mutex.c (apr_proc_mutex_lockfile): Avoid unnecessary
strcmp calls.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65191 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | locks/unix/proc_mutex.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c index abc732914..1dfd806d9 100644 --- a/locks/unix/proc_mutex.c +++ b/locks/unix/proc_mutex.c @@ -815,11 +815,10 @@ APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex) 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; |