lkml.org 
[lkml]   [2019]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 8/9] minor kstrdup_quotable simplification
Date
From: "J. Bruce Fields" <bfields@redhat.com>

---
lib/string_helpers.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index 47f40406f9d4..6f553f893fda 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -518,8 +518,8 @@ char *kstrdup_quotable(const char *src, gfp_t gfp)
{
size_t slen, dlen;
char *dst;
- const int flags = ESCAPE_STYLE_HEX;
- const char esc[] = "\f\n\r\t\v\a\e\\\"";
+ const int flags = ESCAPE_SPECIAL|ESCAPE_STYLE_HEX;
+ const char esc[] = "\"";

if (!src)
return NULL;
--
2.21.0
\
 
 \ /
  Last update: 2019-09-05 21:45    [W:0.069 / U:6.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site