[syslinux:elflink] xfs: Make xfs_dir2_entry_name_cmp() inline

syslinux-bot for Paulo Alcantara pcacjr at zytor.com
Thu Jan 24 09:45:06 PST 2013


Commit-ID:  e92e971550777e3170c063e348a3aab5ccaf6ff9
Gitweb:     http://www.syslinux.org/commit/e92e971550777e3170c063e348a3aab5ccaf6ff9
Author:     Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Mon, 21 Jan 2013 17:42:59 -0200
Committer:  Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Mon, 21 Jan 2013 17:44:16 -0200

xfs: Make xfs_dir2_entry_name_cmp() inline

Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>

---
 core/fs/xfs/xfs_dir2.c | 12 ------------
 core/fs/xfs/xfs_dir2.h | 14 +++++++++++++-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index 4c63ec9..d833c25 100644
--- a/core/fs/xfs/xfs_dir2.c
+++ b/core/fs/xfs/xfs_dir2.c
@@ -28,18 +28,6 @@
 
 #include "xfs_dir2.h"
 
-int xfs_dir2_entry_name_cmp(uint8_t *start, uint8_t *end, const char *name)
-{
-    if (!name || (strlen(name) != end - start))
-	return -1;
-
-    while (start < end)
-	if (*start++ != *name++)
-	    return -1;
-
-    return 0;
-}
-
 uint32_t xfs_dir2_da_hashname(const uint8_t *name, int namelen)
 {
     uint32_t hash;
diff --git a/core/fs/xfs/xfs_dir2.h b/core/fs/xfs/xfs_dir2.h
index 8e4e985..fa403f3 100644
--- a/core/fs/xfs/xfs_dir2.h
+++ b/core/fs/xfs/xfs_dir2.h
@@ -23,7 +23,6 @@
 
 #include "xfs.h"
 
-int xfs_dir2_entry_name_cmp(uint8_t *start, uint8_t *end, const char *name);
 void *xfs_dir2_get_dirblks(struct fs_info *fs, block_t startblock,
 			   xfs_filblks_t c);
 uint32_t xfs_dir2_da_hashname(const uint8_t *name, int namelen);
@@ -51,4 +50,17 @@ static inline bool xfs_dir2_isleaf(struct fs_info *fs, xfs_dinode_t *dip)
     return (last == XFS_INFO(fs)->dirleafblk + (1 << XFS_INFO(fs)->dirblklog));
 }
 
+static inline int xfs_dir2_entry_name_cmp(uint8_t *start, uint8_t *end,
+					  const char *name)
+{
+    if (!name || (strlen(name) != end - start))
+	return -1;
+
+    while (start < end)
+	if (*start++ != *name++)
+	    return -1;
+
+    return 0;
+}
+
 #endif /* XFS_DIR2_H_ */


More information about the Syslinux-commits mailing list