2003-06-21 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sun, 22 Jun 2003 00:51:44 +0000 (00:51 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 22 Jun 2003 00:51:44 +0000 (00:51 +0000)
* 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.

sim/ppc/ChangeLog
sim/ppc/hw_com.c

index a9bc0042b06c1cd4bf8ffb7ee88a5fd14a223a50..7b100550db27d2d4aa0c4ca6e11ac4af50fa0112 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2003-06-20  Andrew Cagney  <cagney@redhat.com>
 
        * sim_calls.c (sim_create_inferior): Assert that
index 436232289d226a12dee9573fe8b0f1432b665c1d..ff8afe7348278abc4b0ac1a7c042bba14387dbcb 100644 (file)
@@ -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");
This page took 0.043081 seconds and 4 git commands to generate.