projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Eliminate temp_case, and a few other cleanups.
[pspp]
/
src
/
str.c
diff --git
a/src/str.c
b/src/str.c
index 4bf2d60c67f1578629abe5cc56771b1d819b1b14..8912f3e58b6a4ec5921e58a952fd316dcb137560 100644
(file)
--- a/
src/str.c
+++ b/
src/str.c
@@
-18,6
+18,7
@@
02111-1307, USA. */
#include <config.h>
02111-1307, USA. */
#include <config.h>
+#include "str.h"
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <assert.h>
#include <ctype.h>
#include <limits.h>
@@
-25,7
+26,6
@@
#include "alloc.h"
#include "error.h"
#include "pool.h"
#include "alloc.h"
#include "error.h"
#include "pool.h"
-#include "str.h"
\f
/* sprintf() wrapper functions for convenience. */
\f
/* sprintf() wrapper functions for convenience. */
@@
-331,7
+331,11
@@
ds_end (const struct string *st)
void
ds_concat (struct string *st, const char *s)
{
void
ds_concat (struct string *st, const char *s)
{
- size_t s_len = strlen (s);
+ size_t s_len;
+
+ if (!s) return;
+
+ s_len = strlen (s);
ds_extend (st, st->length + s_len);
strcpy (st->string + st->length, s);
st->length += s_len;
ds_extend (st, st->length + s_len);
strcpy (st->string + st->length, s);
st->length += s_len;