On Sat, Jul 07, 2012 at 11:49:13PM -0700, Ben Pfaff wrote: The DATASET CLOSE command, when it act on the active dataset, just ^^^ This verb is incorrectly conjugated.
+/* Returns an identifier that is is not currently in use as a dataset name. */ +char * +session_generate_dataset_name (struct session *s) +{ + for (;;) + { + char *name = xasprintf ("DataSet%d", ++s->n_dataset_names); + if (!session_lookup_dataset (s, name)) + return name; + free (name); + } +} I suppose it's unlikely, but this loop could become endless. Might it not be an idea to check that n_dataset_names is non-negative? Also, perhaps the comment should say that the caller should free the returned name. J' -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature
_______________________________________________ pspp-dev mailing list pspp-dev@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-dev