fileio.c : Remove superfluous assignment of 'fname'.
main.c : print out '<stdin>' and '<stdout>' instead of '-' when using stdio for I/O. Thanks to Francisco T. A. Silva <ftas@geodigitus.com.br> for catching this, and the error fixed by the previous commit as well. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@325 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
5280d185be
commit
a44054650f
1
fileio.c
1
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",
|
||||
|
|
4
main.c
4
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 ? "<stdout>" : 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 ? "<stdin>" : inputf);
|
||||
rc = fileio(FIO_READ, inputf, filefmt, p, memtype, -1);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "%s: terminating\n", progname);
|
||||
|
|
Loading…
Reference in New Issue