From a5bdc7ee1e3d69ff9e32987a58ebae94043db9e2 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 14 Apr 2016 14:06:10 +0100 Subject: [PATCH] Tidying: coverity issues --- src/src/lookups/lf_quote.c | 6 +++++- src/src/transports/pipe.c | 7 ++++--- 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; } -- 2.30.2