aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric B Munson <emunson@mgebm.net>2010-11-17 13:46:03 -0700
committerEric B Munson <emunson@mgebm.net>2010-11-17 14:00:06 -0700
commit3e15b85caca5d11cb2102ab9ea16a37a4af8034b (patch)
tree4762aa7accc486d1effcec463fb0c738d07ee606
parentf06d204636c3bee535de0072e150d9e20f1cef94 (diff)
downloadlibhugetlbfs-3e15b85caca5d11cb2102ab9ea16a37a4af8034b.tar.gz
Rename variable in inline function
hpage_size is a fairly common variable name in this library so it is dangerous to use it in an inlined function. This patch renames it to __hpage_size to avoid name collisions. Signed-off-by: Eric B Munson <emunson@mgebm.net>
-rw-r--r--tests/hugetests.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/hugetests.h b/tests/hugetests.h
index b5b2647..85f5b4f 100644
--- a/tests/hugetests.h
+++ b/tests/hugetests.h
@@ -121,8 +121,8 @@ extern long gethugepagesize (void) __attribute__ ((weak));
static inline long check_hugepagesize()
{
- long hpage_size = gethugepagesize();
- if (hpage_size < 0) {
+ long __hpage_size = gethugepagesize();
+ if (__hpage_size < 0) {
if (errno == ENOSYS)
CONFIG("No hugepage kernel support\n");
else if (errno == EOVERFLOW)
@@ -130,7 +130,7 @@ static inline long check_hugepagesize()
else
CONFIG("Hugepage size (%s)", strerror(errno));
}
- return hpage_size;
+ return __hpage_size;
}
int using_system_hpage_size(const char *mount);