X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/e0748aab538eb09d53d767a305aaccc86489bf23..885b60b3ea2aed49543ea87490ff971a68a5c2f1:/tipo3/emufs.c diff --git a/tipo3/emufs.c b/tipo3/emufs.c index 3d76066..4d74097 100644 --- a/tipo3/emufs.c +++ b/tipo3/emufs.c @@ -9,8 +9,9 @@ char *str_dup(const char *s) { + char *tmp; if (s == NULL) return NULL; - char *tmp = (char *)malloc(sizeof(char)*(strlen(s)+1)); + tmp = (char *)malloc(sizeof(char)*(strlen(s)+1)); strcpy(tmp, s); return tmp; } @@ -145,7 +146,7 @@ int ver_archivo_FS(EMUFS *emu) /* Imprimo la lista de bloques/registros */ strcpy(name_f_block_free,emu->nombre); - strcat(name_f_block_free,".fsc"); + strcat(name_f_block_free,".idx"); { BLOCK_REG_T r; f_block_free = fopen(name_f_block_free, "r");