Index: sim/frv/ChangeLog
[binutils-gdb.git] / sim / ppc / hw_com.c
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");