summaryrefslogtreecommitdiff
path: root/sim/ppc/hw_com.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-22 00:51:44 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-22 00:51:44 +0000
commit3842b497db8317f7b56b6d6cba9258a9ab2a2261 (patch)
tree1602e80c2523eb3dd6ceda72b262c207acdc94e5 /sim/ppc/hw_com.c
parentd005e7778f9570f95d9c4d46ef795d291e9e1d06 (diff)
downloadgdb-3842b497db8317f7b56b6d6cba9258a9ab2a2261.tar.gz
2003-06-21 Andrew Cagney <cagney@redhat.com>
* hw_com.c (hw_com_device_init_data): Check that the output, and not input file opened. Pointed out by masahino tky3.3web.ne.jp.
Diffstat (limited to 'sim/ppc/hw_com.c')
-rw-r--r--sim/ppc/hw_com.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c
index 436232289d2..ff8afe73482 100644
--- a/sim/ppc/hw_com.c
+++ b/sim/ppc/hw_com.c
@@ -249,7 +249,7 @@ hw_com_device_init_data(device *me)
if (device_find_property(me, "output-file") != NULL) {
const char *output_file = device_find_string_property(me, "output-file");
com->output.file = fopen(output_file, "w");
- if (com->input.file == NULL)
+ if (com->output.file == NULL)
device_error(me, "Problem opening output file %s\n", output_file);
if (device_find_property(me, "output-buffering") != NULL) {
const char *buffering = device_find_string_property(me, "output-buffering");