summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
65c7da3)
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
Tue Apr 25 11:07:19 2006 Ben Pfaff <blp@gnu.org>
Finish reforming error message support. In this phase, move
-/* 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 *
ds_append_uninit(struct string *st, size_t incr)
{
- char *end ;
- assert(incr >= 0 );
- ds_extend(st, ds_length(st) + incr + 1);
+ ds_extend(st, ds_length(st) + incr);