mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 23:30:07 +01:00
all: avoid backslash escape double quote inside single quote
It's not necessary.
This commit is contained in:
parent
de1741e2d0
commit
bb341900dd
2 changed files with 5 additions and 5 deletions
|
|
@ -803,7 +803,7 @@ test_write_duid (void)
|
|||
static void
|
||||
test_write_existing_duid (void)
|
||||
{
|
||||
const guint8 duid[] = { 000, 001, 000, 001, 023, 'o', 023, 'n', 000, '\"', 0372, 0214, 0326, 0302 };
|
||||
const guint8 duid[] = { 000, 001, 000, 001, 023, 'o', 023, 'n', 000, '"', 0372, 0214, 0326, 0302 };
|
||||
const char *original_contents = "default-duid \"\\000\\001\\000\\001\\027X\\350X\\000#\\025\\010~\\254\";\n";
|
||||
const char *expected_contents = "default-duid \"\\000\\001\\000\\001\\023o\\023n\\000\\\"\\372\\214\\326\\302\";\n";
|
||||
GError *error = NULL;
|
||||
|
|
@ -825,7 +825,7 @@ test_write_existing_duid (void)
|
|||
g_assert_cmpstr (expected_contents, ==, contents);
|
||||
}
|
||||
|
||||
static const guint8 DUID_BIN[] = { 000, 001, 000, 001, 023, 'o', 023, 'n', 000, '\"', 0372, 0214, 0326, 0302 };
|
||||
static const guint8 DUID_BIN[] = { 000, 001, 000, 001, 023, 'o', 023, 'n', 000, '"', 0372, 0214, 0326, 0302 };
|
||||
#define DUID "\\000\\001\\000\\001\\023o\\023n\\000\\\"\\372\\214\\326\\302"
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -215,9 +215,9 @@ _escape_ansic (const char *source)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _char_req_escape(ch) NM_IN_SET (ch, '\"', '\\', '$', '`')
|
||||
#define _char_req_escape_old(ch) NM_IN_SET (ch, '\"', '\\', '\'', '$', '`', '~')
|
||||
#define _char_req_quotes(ch) NM_IN_SET (ch, ' ', '\'', '~', '\t', '|', '&', ';', '(', ')', '<', '>')
|
||||
#define _char_req_escape(ch) NM_IN_SET (ch, '"', '\\', '$', '`')
|
||||
#define _char_req_escape_old(ch) NM_IN_SET (ch, '"', '\\', '\'', '$', '`', '~')
|
||||
#define _char_req_quotes(ch) NM_IN_SET (ch, ' ', '\'', '~', '\t', '|', '&', ';', '(', ')', '<', '>')
|
||||
|
||||
const char *
|
||||
svEscape (const char *s, char **to_free)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue