]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
procfs: use F_TYPE_EQUAL() macro for statfs.f_type comparison
authorcgoesche <cgoesc2@wgu.edu>
Sat, 23 Aug 2025 00:56:48 +0000 (20:56 -0400)
committercgoesche <cgoesc2@wgu.edu>
Sat, 23 Aug 2025 00:56:48 +0000 (20:56 -0400)
Addresses: #2332
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
lib/procfs.c

index 5dab11b88a7a9f39d4474ef9ada2f7838618a607..47cc8eea2c75c39513829e80aa233079d0c9f372 100644 (file)
@@ -20,6 +20,7 @@
 #include "all-io.h"
 #include "debug.h"
 #include "strutils.h"
+#include "statfs_magic.h"
 
 static void procfs_process_deinit_path(struct path_cxt *pc);
 
@@ -412,7 +413,7 @@ int fd_is_procfs(int fd)
                }
        } while (ret != 0);
 
-       return st.f_type == STATFS_PROC_MAGIC;
+       return F_TYPE_EQUAL(st.f_type, STATFS_PROC_MAGIC);
        return 0;
 }
 #else