X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/a1a3dc9f23281f1e4efdc2fe54a0d1b0ddc8aac3..7cd2e930f9665432a3bfa725b90bf3c0a3cb5617:/tipo3/emufs.c diff --git a/tipo3/emufs.c b/tipo3/emufs.c index 0cdd43d..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; }