diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-04-11 16:49:09 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-04-11 16:49:09 -0700 |
commit | 263b1a3c1f9be7a3bafdb26d69f808974f886680 (patch) | |
tree | 3dd2bcadab223fc4c0f8d0d6954ec275a5ffc702 /bfd/cache.c | |
parent | 2c008f9a5b65fe8d9379e761b056fabeb34a5da6 (diff) | |
download | gdb-263b1a3c1f9be7a3bafdb26d69f808974f886680.zip gdb-263b1a3c1f9be7a3bafdb26d69f808974f886680.tar.gz gdb-263b1a3c1f9be7a3bafdb26d69f808974f886680.tar.bz2 |
Don't call getpagesize more than once
Diffstat (limited to 'bfd/cache.c')
-rw-r--r-- | bfd/cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/cache.c b/bfd/cache.c index 67d3d17..a0a02e4 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -497,7 +497,8 @@ bfd_cache_init (bfd *abfd) return FALSE; } #ifdef HAVE_MMAP - pagesize_m1 = getpagesize () - 1; + if (pagesize_m1 == 0) + pagesize_m1 = getpagesize () - 1; #endif abfd->iovec = &cache_iovec; insert (abfd); |