does not include space for a null terminator. Also, fix warning.
+Tue May 2 15:41:50 2006 Ben Pfaff <blp@gnu.org>
+
+ * str.c (ds_append_uninit): No need to add 1 to arg passed to
+ ds_extend(), because the argument does not include space for a
+ null terminator. Also, fix warning.
+
Tue Apr 25 11:07:19 2006 Ben Pfaff <blp@gnu.org>
Finish reforming error message support. In this phase, move
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);