Change strdup calls to xstrdup (patch from Steve Merrifield).

This commit is contained in:
Matt Kraai
2001-11-12 16:57:27 +00:00
parent 357cfc739e
commit c8227639db
9 changed files with 22 additions and 22 deletions

View File

@ -2324,7 +2324,7 @@ int bunzip2_main(int argc, char **argv)
show_usage();
}
src_stream = xfopen(argv[1], "r");
save_name = strdup(argv[1]);
save_name = xstrdup(argv[1]);
save_name_ptr = strrchr(save_name, '.');
if (save_name_ptr == NULL) {
return(FALSE);

View File

@ -114,7 +114,7 @@ extern int gunzip_main(int argc, char **argv)
if (argv[optind] == NULL || strcmp(argv[optind], "-") == 0) {
flags |= gunzip_to_stdout;
} else {
if_name = strdup(argv[optind]);
if_name = xstrdup(argv[optind]);
/* Open input file */
in_file = xfopen(if_name, "r");