X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Flookups%2Fnisplus.c;h=6a3351eccab09168b88117ffeae17903a754cbf7;hb=72c385bddd9732b63b9c8fedb18e4469ddbead75;hp=61cc7018462b1a89e07ad5c2d9101f58f829c27d;hpb=a40f593b6106dcb1b01d9528838709c4cd20f030;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/lookups/nisplus.c b/src/src/lookups/nisplus.c index 61cc70184..6a3351ecc 100644 --- a/src/src/lookups/nisplus.c +++ b/src/src/lookups/nisplus.c @@ -148,7 +148,8 @@ for (int i = 0; i < eo->en_cols.en_cols_len; i++) 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--; @@ -156,7 +157,7 @@ for (int i = 0; i < eo->en_cols.en_cols_len; i++) 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 */