From: Masatake YAMATO Date: Thu, 2 Feb 2023 16:25:17 +0000 (+0900) Subject: lsfd: move kernel32_to_cpu() front in the source file X-Git-Tag: v2.39-rc1~83^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9020c2e0f45db80c17cf3373a7adba5847d4424e;p=thirdparty%2Futil-linux.git lsfd: move kernel32_to_cpu() front in the source file Signed-off-by: Masatake YAMATO --- diff --git a/misc-utils/lsfd-sock-xinfo.c b/misc-utils/lsfd-sock-xinfo.c index d4a5563c05..934fd08cb5 100644 --- a/misc-utils/lsfd-sock-xinfo.c +++ b/misc-utils/lsfd-sock-xinfo.c @@ -432,6 +432,14 @@ static bool inet_fill_column(struct proc *proc __attribute__((__unused__)), return false; } +static uint32_t kernel32_to_cpu(enum sysfs_byteorder byteorder, uint32_t v) +{ + if (byteorder == SYSFS_BYTEORDER_LITTLE) + return le32_to_cpu(v); + else + return be32_to_cpu(v); +} + /* * TCP */ @@ -603,14 +611,6 @@ static bool L3_verify_initial_line(const char *line) return (strncmp(line, "sl", 2) == 0); } -static uint32_t kernel32_to_cpu(enum sysfs_byteorder byteorder, uint32_t v) -{ - if (byteorder == SYSFS_BYTEORDER_LITTLE) - return le32_to_cpu(v); - else - return be32_to_cpu(v); -} - #define TCP_LINE_LEN 256 static void load_xinfo_from_proc_inet_L3(ino_t netns_inode, const char *proc_file, const struct sock_xinfo_class *class)