From: Theodore Ts'o Date: Wed, 28 Feb 2018 03:15:54 +0000 (-0500) Subject: libext2fs: declare local functions static to avoid namespace leakage X-Git-Tag: v1.44.0-rc1~1 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=a9d9ff7ee12e00c9caf977f36665e6c2fd0ce27a;p=tools%2Fe2fsprogs.git 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 --- 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 @@ static int xattr_find_position(struct ext2_xattr *attrs, int count, 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 @@ add_new: 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;