aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-22 03:40:34 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-22 03:40:34 +0000
commit1465dd0f9eeb612ba4bc3e4067a29ea3468f5122 (patch)
tree28e6b96dd570fd128c8e7b199773d58508b7e7c8 /nscd
parentc44d3bdf14b75389f1fea86bfb03c9c38ea40f17 (diff)
downloadglibc-1465dd0f9eeb612ba4bc3e4067a29ea3468f5122.zip
glibc-1465dd0f9eeb612ba4bc3e4067a29ea3468f5122.tar.gz
glibc-1465dd0f9eeb612ba4bc3e4067a29ea3468f5122.tar.bz2
[BZ #4946]
* nscd/connections.c (handle_request): Using sendfile always requires that mmap is used for the database. Patch by Petr Baudis <pasky@suse.cz>.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index 20b676e..e435fa8 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1016,7 +1016,7 @@ cannot handle old request version %d; current version is %d"),
ssize_t nwritten;
#ifdef HAVE_SENDFILE
- if (db->mmap_used || !cached->notfound)
+ if (__builtin_expect (db->mmap_used, 1))
{
assert (db->wr_fd != -1);
assert ((char *) cached->data > (char *) db->data);