Make dictionary compacting functions a little more general.
[pspp-builds.git] / src / data / scratch-writer.c
index 8bedef65677d984c67a2391cc9c47fa598d779ba..4802f4b20363b5f946660e6c920c10631fbb89b8 100644 (file)
@@ -61,7 +61,7 @@ scratch_writer_open (struct file_handle *fh,
 
   /* Copy the dictionary and compact if needed. */
   scratch_dict = dict_clone (dictionary);
-  if (dict_needs_compaction (scratch_dict)) 
+  if (dict_compacting_would_shrink (scratch_dict)) 
     {
       compactor = dict_make_compactor (scratch_dict);
       dict_compact_values (scratch_dict);