fix incorrect buffer type, and exit(1) on failure to open a tempfile
This commit is contained in:
parent
56679b429b
commit
d936068864
|
|
@ -1,3 +1,7 @@
|
|||
2010-09-12 Robert Larice
|
||||
* src/main.c :
|
||||
fix incorrect buffer type, and exit(1) on failure to open a tempfile
|
||||
|
||||
2010-09-08 Holger Vogt
|
||||
* inp.c, inpcom.c: include libiberty.h removed
|
||||
* terminal.c, ivars.c, ifnewuid.c, inperror.c, tclspice.c, main.c:
|
||||
|
|
|
|||
|
|
@ -629,7 +629,7 @@ show_version(void)
|
|||
static void
|
||||
append_to_stream(FILE *dest, FILE *source)
|
||||
{
|
||||
char *buf[BSIZE_SP];
|
||||
char buf[BSIZE_SP];
|
||||
int i;
|
||||
|
||||
while ((i = fread(buf, 1, BSIZE_SP, source)) > 0)
|
||||
|
|
@ -1084,6 +1084,11 @@ bot:
|
|||
}
|
||||
#endif
|
||||
|
||||
if(!tempfile) {
|
||||
perror("tmpfile()");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (optind == argc && !istty) {
|
||||
append_to_stream(tempfile, stdin);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue