]> git.llucax.com Git - z.facultad/75.06/emufs.git/blobdiff - emufs/fsc.c
Small change al fix de Luca en emufs_fsc_agregar_gap. No need to break the while...
[z.facultad/75.06/emufs.git] / emufs / fsc.c
index 4aaaa177862fc4edf72a4f0a50c8c2345714ad17..75202826c0a11debd6a27a30063750bd3bd8724b 100644 (file)
@@ -125,7 +125,7 @@ int emufs_fsc_agregar_gap(EMUFS *emu, EMUFS_OFFSET marker, EMUFS_FREE freespace)
                /* Busco el gap que sucede a este */
                fseek(f_fsc,0,SEEK_SET);
                while (!feof(f_fsc)) {
-                       fread(&gap_aux,sizeof(EMUFS_FSC),1,f_fsc);
+                       if (fread(&gap_aux,sizeof(EMUFS_FSC),1,f_fsc) != 1) continue;
                        if (gap_aux.marker > gap_new.marker) {
                                found = 1;
                                break;
@@ -567,4 +567,3 @@ EMUFS_BLOCK_ID emufs_fsc_get_num_blocks(EMUFS* efs)
        fclose(f_fsc);
        return cant;
 }
-