From 9329663ad63b9b9a0df62f6dddbb1d7dfb6c7bfc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 Oct 2021 16:14:14 +0200 Subject: [PATCH] kernel: replace some uses of gap_strlcat --- src/opers.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/opers.cc b/src/opers.cc index 29cc99ed4fc..b96713c8c9e 100644 --- a/src/opers.cc +++ b/src/opers.cc @@ -1169,7 +1169,6 @@ Obj NewAndFilter ( Int str_len; Obj str; - char* s; RequireFilter(0, oper1, ""); RequireFilter(0, oper2, ""); @@ -1185,14 +1184,11 @@ Obj NewAndFilter ( str_len = GET_LEN_STRING(NAME_FUNC(oper1)) + GET_LEN_STRING(NAME_FUNC(oper2)) + 8; str = NEW_STRING(str_len); - s = CSTR_STRING(str); - s[0] = '('; - s[1] = 0; - gap_strlcat(s, CONST_CSTR_STRING(NAME_FUNC(oper1)), str_len); - gap_strlcat(s, " and ", str_len); - gap_strlcat(s, CONST_CSTR_STRING(NAME_FUNC(oper2)), str_len); - gap_strlcat(s, ")", str_len); - SET_LEN_STRING(str, str_len - 1); + AppendCStr(str, "(", 1); + AppendString(str, NAME_FUNC(oper1)); + AppendCStr(str, " and ", 5); + AppendString(str, NAME_FUNC(oper2)); + AppendCStr(str, ")", 1); getter = NewFunctionT( T_FUNCTION, sizeof(OperBag), str, 1, ArglistObj, (ObjFunc)DoAndFilter );