summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-04-14 14:06:10 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-04-14 14:06:10 +0100
commita5bdc7ee1e3d69ff9e32987a58ebae94043db9e2 (patch)
treef461c50ab1ecd88dd145876543cf9f43b7652528
parentc4277da6a71f2229077063796cea96d6adf5518a (diff)
Tidying: coverity issues
-rw-r--r--src/src/lookups/lf_quote.c6
-rw-r--r--src/src/transports/pipe.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/src/src/lookups/lf_quote.c b/src/src/lookups/lf_quote.c
index 86cdeef28..2a76756e9 100644
--- a/src/src/lookups/lf_quote.c
+++ b/src/src/lookups/lf_quote.c
@@ -37,7 +37,11 @@ result = string_append(result, asize, aoffset, 2, name, US"=");
/* NULL is handled as an empty string */
-if (value == NULL) value = US"";
+if (!value)
+ {
+ value = US"";
+ vlength = 0;
+ }
/* Quote the value if it is empty, contains white space, or starts with a quote
character. */
diff --git a/src/src/transports/pipe.c b/src/src/transports/pipe.c
index 5ebd64f32..db522e54b 100644
--- a/src/src/transports/pipe.c
+++ b/src/src/transports/pipe.c
@@ -489,11 +489,12 @@ if (expand_arguments)
for (ad = addr; ad != NULL; ad = ad->next)
{
- if (ad != addr) string_catn(s, &size, &offset, US" ", 1);
- string_cat(s, &size, &offset, ad->address);
+ /*XXX string_append_listele() ? */
+ if (ad != addr) s = string_catn(s, &size, &offset, US" ", 1);
+ s = string_cat(s, &size, &offset, ad->address);
}
- string_cat(s, &size, &offset, q);
+ s = string_cat(s, &size, &offset, q);
s[offset] = 0;
}