No need to add 1 to arg passed to ds_extend(), because the argument
[pspp-builds.git] / src / libpspp / str.c
index 613ecbc5455c69549c2880a3944ed124bfcaf502..c4ce9c512b74a94a919dc06aff46d9983b5b5c38 100644 (file)
@@ -681,14 +681,13 @@ ds_concat (struct string *st, const char *buf, size_t len)
   st->length += len;
 }
 
-/* Returns ds_end(ST) and THEN increases the length by INCR */
+/* Returns ds_end(ST) and THEN increases the length by INCR. */
 char *
 ds_append_uninit(struct string *st, size_t incr)
 {
-  char *end ;
-  assert(incr >= 0 );
+  char *end;
 
-  ds_extend(st, ds_length(st) + incr + 1);
+  ds_extend(st, ds_length(st) + incr);
 
   end = ds_end(st);