aboutsummaryrefslogtreecommitdiff
path: root/src/garray.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/garray.c')
-rw-r--r--src/garray.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/garray.c b/src/garray.c
index 1c79274fc8..7dee7203cc 100644
--- a/src/garray.c
+++ b/src/garray.c
@@ -121,16 +121,14 @@ char_u* ga_concat_strings(garray_T *gap)
s = alloc(len + 1);
- if (s != NULL) {
- *s = NUL;
-
- for (i = 0; i < gap->ga_len; ++i) {
- if (*s != NUL) {
- STRCAT(s, ",");
- }
- STRCAT(s, ((char_u **)(gap->ga_data))[i]);
+ *s = NUL;
+ for (i = 0; i < gap->ga_len; ++i) {
+ if (*s != NUL) {
+ STRCAT(s, ",");
}
+ STRCAT(s, ((char_u **)(gap->ga_data))[i]);
}
+
return s;
}