chiark / gitweb /
Add ugly CMP_F_TYPE() macro
[elogind.git] / src / journal / sd-journal.c
index cc11ad9b56765a1337b5f52c8c3e795c4c7df0c4..e92f20b63b84b85b04a9ebec0cad2a44a8f7eeae 100644 (file)
@@ -1248,11 +1248,11 @@ static void check_network(sd_journal *j, int fd) {
                 return;
 
         j->on_network =
-                (long)sfs.f_type == (long)CIFS_MAGIC_NUMBER ||
-                sfs.f_type == CODA_SUPER_MAGIC ||
-                sfs.f_type == NCP_SUPER_MAGIC ||
-                sfs.f_type == NFS_SUPER_MAGIC ||
-                sfs.f_type == SMB_SUPER_MAGIC;
+                CMP_F_TYPE(sfs.f_type, CIFS_MAGIC_NUMBER) ||
+                CMP_F_TYPE(sfs.f_type, CODA_SUPER_MAGIC) ||
+                CMP_F_TYPE(sfs.f_type, NCP_SUPER_MAGIC) ||
+                CMP_F_TYPE(sfs.f_type, NFS_SUPER_MAGIC) ||
+                CMP_F_TYPE(sfs.f_type, SMB_SUPER_MAGIC);
 }
 
 static int add_file(sd_journal *j, const char *prefix, const char *filename) {