empty string for consistency. Remove trailing whitespace and zero
bytes. */
- if (value == NULL) value = US""; else
+ if (!value) value = US"";
+ else
while (len > 0 && (value[len-1] == 0 || isspace(value[len-1])))
len--;
if (!field_name)
{
- yield = string_cat (yield, tc->tc_name);
+ yield = string_cat (yield, US tc->tc_name);
yield = string_catn(yield, US"=", 1);
/* Quote the value if it contains spaces or is empty */
*errmsg = string_sprintf("NIS+ field %s not found for %s", field_name,
query);
else
- store_reset(yield->s + yield->ptr + 1);
+ gstring_release_unused(yield);
/* Free result store before finishing. */
while (*t != 0) if (*t++ == '\"') count++;
if (count == 0) return s;
-t = quoted = store_get(Ustrlen(s) + count + 1);
+t = quoted = store_get(Ustrlen(s) + count + 1, is_tainted(s));
while (*s != 0)
{