From: Ricardo Markiewicz Date: Mon, 5 Apr 2004 22:01:32 +0000 (+0000) Subject: * Algunas cosas para que valgrind nos deje vivir. X-Git-Tag: svn_import_r684~632 X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/commitdiff_plain/f433f56391fae5c147650c0a4d53d4c0552c33b0?ds=inline * Algunas cosas para que valgrind nos deje vivir. --- diff --git a/tipo3/main.c b/tipo3/main.c index c9796c1..41d9594 100644 --- a/tipo3/main.c +++ b/tipo3/main.c @@ -42,7 +42,7 @@ int main() printf("ID6 = %d\n", n6); printf("ID7 = %d\n", n7); - fp->leer_registro(fp, n3, b, 100); + fp->leer_registro(fp, n4, b, 100); printf("Ok\n"); printf("Recuperado : %s\n", b); diff --git a/tipo3/param_cte.c b/tipo3/param_cte.c index b5787b6..5ef131f 100644 --- a/tipo3/param_cte.c +++ b/tipo3/param_cte.c @@ -258,7 +258,7 @@ int buscar_lugar(EMUFS *emu, unsigned long tam, int *fs) reg.block = -1; *fs = emu->tam_bloque; while( !feof(f_block_free) ){ - fread(®,sizeof(BLOCK_FREE_T),1,f_block_free); + if (fread(®,sizeof(BLOCK_FREE_T),1,f_block_free) != 1) continue; if ( reg.free_space >= tam ) break; else {