]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: declare local functions static to avoid namespace leakage
authorTheodore Ts'o <tytso@mit.edu>
Wed, 28 Feb 2018 03:15:54 +0000 (22:15 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 28 Feb 2018 03:15:54 +0000 (22:15 -0500)
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>
lib/ext2fs/ext_attr.c

index f4cc2d0563fa6061317787b36340ba2082934716..89c5f2cb6baa52387f8172f5ea74df4f9b55aaf1 100644 (file)
@@ -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;