mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 22:00:13 +01:00
strbuf: drop nm_str_buf_append_c[24]() for nm_str_buf_append_c()
This commit is contained in:
parent
94ce36f816
commit
a6cf94cfc4
3 changed files with 7 additions and 10 deletions
|
|
@ -989,7 +989,7 @@ lease_option_print_label(NMStrBuf *sbuf, size_t n_label, const uint8_t **datap,
|
|||
break;
|
||||
case '.':
|
||||
case '\\':
|
||||
nm_str_buf_append_c2(sbuf, '\\', c);
|
||||
nm_str_buf_append_c(sbuf, '\\', c);
|
||||
break;
|
||||
default:
|
||||
nm_str_buf_append_printf(sbuf, "\\%3d", c);
|
||||
|
|
|
|||
|
|
@ -2708,11 +2708,11 @@ nm_g_type_find_implementing_class_for_property(GType gtype, const char *pname)
|
|||
static void
|
||||
_str_buf_append_c_escape_octal(NMStrBuf *strbuf, char ch)
|
||||
{
|
||||
nm_str_buf_append_c4(strbuf,
|
||||
'\\',
|
||||
'0' + ((char) ((((guchar) ch) >> 6) & 07)),
|
||||
'0' + ((char) ((((guchar) ch) >> 3) & 07)),
|
||||
'0' + ((char) ((((guchar) ch)) & 07)));
|
||||
nm_str_buf_append_c(strbuf,
|
||||
'\\',
|
||||
'0' + ((char) ((((guchar) ch) >> 6) & 07)),
|
||||
'0' + ((char) ((((guchar) ch) >> 3) & 07)),
|
||||
'0' + ((char) ((((guchar) ch)) & 07)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2962,7 +2962,7 @@ nm_utils_buf_utf8safe_escape(gconstpointer buf,
|
|||
|
||||
nm_assert(ch);
|
||||
if (ch == '\\')
|
||||
nm_str_buf_append_c2(&strbuf, '\\', '\\');
|
||||
nm_str_buf_append_c(&strbuf, '\\', '\\');
|
||||
else if ((NM_FLAGS_HAS(flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL) && ch < ' ')
|
||||
|| (NM_FLAGS_HAS(flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_NON_ASCII)
|
||||
&& ((guchar) ch) >= 127))
|
||||
|
|
|
|||
|
|
@ -199,9 +199,6 @@ _nm_str_buf_append_c_1(NMStrBuf *strbuf, char ch)
|
|||
#define nm_str_buf_append_c(strbuf, ...) \
|
||||
_nm_str_buf_append_c_n1((strbuf), NM_NARG(__VA_ARGS__), __VA_ARGS__)
|
||||
|
||||
#define nm_str_buf_append_c2(strbuf, ...) nm_str_buf_append_c(strbuf, __VA_ARGS__)
|
||||
#define nm_str_buf_append_c4(strbuf, ...) nm_str_buf_append_c(strbuf, __VA_ARGS__)
|
||||
|
||||
static inline void
|
||||
nm_str_buf_append_c_hex(NMStrBuf *strbuf, char ch, gboolean upper_case)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue