pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src/libpspp str.c ChangeLog


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src/libpspp str.c ChangeLog
Date: Tue, 02 May 2006 22:46:00 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Branch:         
Changes by:     Ben Pfaff <address@hidden>      06/05/02 22:46:00

Modified files:
        src/libpspp    : str.c ChangeLog 

Log message:
        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.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/libpspp/str.c.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/libpspp/ChangeLog.diff?tr1=1.16&tr2=1.17&r1=text&r2=text

Patches:
Index: pspp/src/libpspp/ChangeLog
diff -u pspp/src/libpspp/ChangeLog:1.16 pspp/src/libpspp/ChangeLog:1.17
--- pspp/src/libpspp/ChangeLog:1.16     Tue Apr 25 18:11:08 2006
+++ pspp/src/libpspp/ChangeLog  Tue May  2 22:46:00 2006
@@ -1,3 +1,9 @@
+Tue May  2 15:41:50 2006  Ben Pfaff  <address@hidden>
+
+       * 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  <address@hidden>
 
        Finish reforming error message support.  In this phase, move
Index: pspp/src/libpspp/str.c
diff -u pspp/src/libpspp/str.c:1.7 pspp/src/libpspp/str.c:1.8
--- pspp/src/libpspp/str.c:1.7  Tue May  2 03:51:43 2006
+++ pspp/src/libpspp/str.c      Tue May  2 22:46:00 2006
@@ -681,14 +681,13 @@
   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);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]