X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/5c0d358fe5d851c242833cab7c5a6765007097ae..3399f7642a12387eb7704b550e52bb1fce93e8a9:/emufs/tipo2.c diff --git a/emufs/tipo2.c b/emufs/tipo2.c index 9f28dc6..10867d6 100644 --- a/emufs/tipo2.c +++ b/emufs/tipo2.c @@ -210,8 +210,7 @@ int emufs_tipo2_dummyfill(EMUFS *efs, EMUFS_OFFSET reg_pos, EMUFS_REG_SIZE amoun FILE *f_data; char name_f[255]; char *dummyfill; - char *ptr_cur; - unsigned long fill_size,byte_count; + unsigned long fill_size; /* Armamos el filename del archivo de datos */ strcpy(name_f,efs->nombre); @@ -223,8 +222,6 @@ int emufs_tipo2_dummyfill(EMUFS *efs, EMUFS_OFFSET reg_pos, EMUFS_REG_SIZE amoun fill_size = amount+sizeof(EMUFS_REG_ID)+sizeof(EMUFS_REG_SIZE); dummyfill = (char*)malloc(fill_size); memset(dummyfill, 0, fill_size); - ptr_cur = dummyfill; - for (byte_count = 0; byte_count < fill_size; ++byte_count) memcpy(ptr_cur+byte_count,0,1); fseek(f_data,reg_pos,SEEK_SET); fwrite(dummyfill,fill_size,1,f_data); fclose(f_data); @@ -314,7 +311,7 @@ void emufs_tipo2_compactar(EMUFS *efs) EMUFS_FSC reg1,reg2; unsigned long cant_gaps = 0,mustmove_bytes = 0,source = 0, destination = 0,datsize = 0,totalfsc = 0; - + strcpy(name_fdat,efs->nombre); strcpy(name_ffsc,efs->nombre); strcat(name_fdat,".dat");