diff options
author | Kees Cook <keescook@chromium.org> | 2015-09-09 18:37:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-10 16:29:01 -0400 |
commit | b40bdb7fb2b8359d5dfe19a91c147465c3d0359b (patch) | |
tree | b322288011572fdd5f5f02b480448534f2c824db /include/linux/string_helpers.h | |
parent | d89a3f7335bb5d9e572ecc287b300161200364eb (diff) |
lib/string_helpers: rename "esc" arg to "only"
To further clarify the purpose of the "esc" argument, rename it to "only"
to reflect that it is a limit, not a list of additional characters to
escape.
Signed-off-by: Kees Cook <keescook@chromium.org>
Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/string_helpers.h')
-rw-r--r-- | include/linux/string_helpers.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index 71f711db4500..dabe643eb5fa 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h | |||
@@ -48,24 +48,24 @@ static inline int string_unescape_any_inplace(char *buf) | |||
48 | #define ESCAPE_HEX 0x20 | 48 | #define ESCAPE_HEX 0x20 |
49 | 49 | ||
50 | int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz, | 50 | int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz, |
51 | unsigned int flags, const char *esc); | 51 | unsigned int flags, const char *only); |
52 | 52 | ||
53 | static inline int string_escape_mem_any_np(const char *src, size_t isz, | 53 | static inline int string_escape_mem_any_np(const char *src, size_t isz, |
54 | char *dst, size_t osz, const char *esc) | 54 | char *dst, size_t osz, const char *only) |
55 | { | 55 | { |
56 | return string_escape_mem(src, isz, dst, osz, ESCAPE_ANY_NP, esc); | 56 | return string_escape_mem(src, isz, dst, osz, ESCAPE_ANY_NP, only); |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline int string_escape_str(const char *src, char *dst, size_t sz, | 59 | static inline int string_escape_str(const char *src, char *dst, size_t sz, |
60 | unsigned int flags, const char *esc) | 60 | unsigned int flags, const char *only) |
61 | { | 61 | { |
62 | return string_escape_mem(src, strlen(src), dst, sz, flags, esc); | 62 | return string_escape_mem(src, strlen(src), dst, sz, flags, only); |
63 | } | 63 | } |
64 | 64 | ||
65 | static inline int string_escape_str_any_np(const char *src, char *dst, | 65 | static inline int string_escape_str_any_np(const char *src, char *dst, |
66 | size_t sz, const char *esc) | 66 | size_t sz, const char *only) |
67 | { | 67 | { |
68 | return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, esc); | 68 | return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, only); |
69 | } | 69 | } |
70 | 70 | ||
71 | #endif | 71 | #endif |