--- uae/src/fsdb.c 2018/04/24 16:47:20 1.1 +++ uae/src/fsdb.c 2018/04/24 16:56:31 1.1.1.3 @@ -16,7 +16,6 @@ #include "uae.h" #include "memory.h" #include "custom.h" -#include "readcpu.h" #include "newcpu.h" #include "filesys.h" #include "autoconf.h" @@ -129,7 +128,7 @@ a_inode *fsdb_lookup_aino_aname (a_inode for (;;) { char buf[1 + 4 + 257 + 257 + 81]; if (fread (buf, 1, sizeof buf, f) < sizeof buf) - return 0; + break; if (buf[0] == 0) continue; if (same_aname (buf + 5, aname)) { @@ -149,7 +148,7 @@ a_inode *fsdb_lookup_aino_nname (a_inode return 0; for (;;) { if (fread (buf, 1, sizeof buf, f) < sizeof buf) - return 0; + break; if (buf[0] == 0) continue; if (strcmp (buf + 5 + 257, nname) == 0) { @@ -169,7 +168,7 @@ int fsdb_used_as_nname (a_inode *base, c return 0; for (;;) { if (fread (buf, 1, sizeof buf, f) < sizeof buf) - return 0; + break; if (buf[0] == 0) continue; if (strcmp (buf + 5 + 257, nname) == 0) { @@ -222,10 +221,10 @@ void fsdb_dir_writeback (a_inode *dir) if (! aino->dirty) continue; aino->needs_dbentry = needs_dbentry (aino); - if (aino->needs_dbentry != aino->has_dbentry) - changes_needed = 1; - else if (! aino->needs_dbentry) + if (! aino->needs_dbentry) aino->dirty = 0; + else + changes_needed = 1; } if (! changes_needed) return;