mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-16 12:24:19 +08:00
* chew.c (write_buffer): Check fwrite return value.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2007-10-15 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* chew.c (write_buffer): Check fwrite return value.
|
||||||
|
|
||||||
2007-09-14 Alan Modra <amodra@bigpond.net.au>
|
2007-09-14 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* Makefile.in: Regenerate.
|
* Makefile.in: Regenerate.
|
||||||
|
@ -120,6 +120,7 @@ static void overwrite_string (string_type *, string_type *);
|
|||||||
static void catbuf (string_type *, char *, unsigned int);
|
static void catbuf (string_type *, char *, unsigned int);
|
||||||
static void cattext (string_type *, char *);
|
static void cattext (string_type *, char *);
|
||||||
static void catstr (string_type *, string_type *);
|
static void catstr (string_type *, string_type *);
|
||||||
|
static void die (char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -162,7 +163,9 @@ write_buffer (buffer, f)
|
|||||||
string_type *buffer;
|
string_type *buffer;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
{
|
{
|
||||||
fwrite (buffer->ptr, buffer->write_idx, 1, f);
|
if (buffer->write_idx != 0
|
||||||
|
&& fwrite (buffer->ptr, buffer->write_idx, 1, f) != 1)
|
||||||
|
die ("cannot write output");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user