libext2fs: declare local functions static to avoid namespace leakage
The functions, xattr_array_update() and space_used() were accidentally
allowed to be declared extern and were thus made available via the
shared library. Fix this.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
index f4cc2d0..89c5f2c 100644
--- a/lib/ext2fs/ext_attr.c
+++ b/lib/ext2fs/ext_attr.c
@@ -1382,9 +1382,11 @@
return i;
}
-errcode_t xattr_array_update(struct ext2_xattr_handle *h, const char *name,
- const void *value, size_t value_len, int ibody_free,
- int block_free, int old_idx, int in_inode)
+static errcode_t xattr_array_update(struct ext2_xattr_handle *h,
+ const char *name,
+ const void *value, size_t value_len,
+ int ibody_free, int block_free,
+ int old_idx, int in_inode)
{
struct ext2_xattr tmp;
int add_to_ibody;
@@ -1492,7 +1494,7 @@
return 0;
}
-int space_used(struct ext2_xattr *attrs, int count)
+static int space_used(struct ext2_xattr *attrs, int count)
{
int total = 0;
struct ext2_xattr *x;