From: Alan Kennedy Date: Sun, 18 Apr 2004 06:50:33 +0000 (+0000) Subject: Small change al fix de Luca en emufs_fsc_agregar_gap. No need to break the while... X-Git-Tag: svn_import_r684~371 X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/commitdiff_plain/48029e3062025c9d8bb2f2af9106aca2f91d565a?ds=sidebyside Small change al fix de Luca en emufs_fsc_agregar_gap. No need to break the while, reaching EOF is not an error --- diff --git a/emufs/fsc.c b/emufs/fsc.c index 95d378a..7520282 100644 --- a/emufs/fsc.c +++ b/emufs/fsc.c @@ -125,10 +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)) { - if (fread(&gap_aux,sizeof(EMUFS_FSC),1,f_fsc) != 1) { - if (feof(f_fsc)) break; - PERR("error al leer archivo fsc"); - } + if (fread(&gap_aux,sizeof(EMUFS_FSC),1,f_fsc) != 1) continue; if (gap_aux.marker > gap_new.marker) { found = 1; break; @@ -570,4 +567,3 @@ EMUFS_BLOCK_ID emufs_fsc_get_num_blocks(EMUFS* efs) fclose(f_fsc); return cant; } -