Daniel Carrera wrote:
I'd like to submit the attached patch. This patch was just discussed in the gfortran list. It fixes a couple of TODO items in the MPI library. It is a simple patch.

OK with the following nits fixed.

* As you have now an SVN account, can you add yourself to the ./MAINTAINERS file (section: "Write After Approval")? Don't forget to write an email to gcc-patches@ with that patch after committal.

libgfortran/ChangeLog

2011-07-07  Daniel Carrera <dcarr...@gmail.com>

    * mpi.c (_gfortran_caf_sync_all): Add STAT_STOPPED_IMAGE as a
    possible status value.
    (_gfortran_caf_sync_images): Ditto.

Change "mpi.c" to "caf/mpi.c" - the file name is relative to the ChangeLog file.

+      char msg[30];
+      int len;
+
+      if (caf_is_finalized)
+       len = snprintf (msg, 30, "ERROR: Image %d is stopped", caf_this_image);
+      else
+       len = snprintf (msg, 30, "SYNC ALL failed");

I would like to avoid magic numbers like "30"; in this case, one can replace the 30 in snprintf by a simple "sizeof (msg)".


+      if (caf_is_finalized)
+       len = snprintf (msg, 30, "ERROR: Image %d is stopped", caf_this_image);
+      else
+       len = snprintf (msg, 30, "SYNC IMAGES failed");

Ditto.

Tobias

Reply via email to