diff --git a/avrdude/fileio.c b/avrdude/fileio.c index ef6a5c1b..f3806215 100644 --- a/avrdude/fileio.c +++ b/avrdude/fileio.c @@ -1019,7 +1019,6 @@ int fileio(int op, char * filename, FILEFMT format, if (format != FMT_IMM) { if (!using_stdio) { - fname = filename; f = fopen(fname, fio.mode); if (f == NULL) { fprintf(stderr, "%s: can't open %s file %s: %s\n", diff --git a/avrdude/main.c b/avrdude/main.c index 12fbb1d2..c1d50fc5 100644 --- a/avrdude/main.c +++ b/avrdude/main.c @@ -887,7 +887,7 @@ int main(int argc, char * argv []) size = rc; fprintf(stderr, "%s: writing output file \"%s\"\n", - progname, outputf); + progname, strcmp(outputf, "-")==0 ? "" : outputf); rc = fileio(FIO_WRITE, outputf, filefmt, p, memtype, size); if (rc < 0) { fprintf(stderr, "%s: terminating\n", progname); @@ -902,7 +902,7 @@ int main(int argc, char * argv []) * read the data from the specified file */ fprintf(stderr, "%s: reading input file \"%s\"\n", - progname, inputf); + progname, strcmp(inputf, "-")==0 ? "" : inputf); rc = fileio(FIO_READ, inputf, filefmt, p, memtype, -1); if (rc < 0) { fprintf(stderr, "%s: terminating\n", progname);