Commit bb341900 authored by Thomas Haller's avatar Thomas Haller

all: avoid backslash escape double quote inside single quote

It's not necessary.
parent de1741e2
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment