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>
This commit is contained in:

committed by
Linus Torvalds

parent
d89a3f7335
commit
b40bdb7fb2
@@ -48,24 +48,24 @@ static inline int string_unescape_any_inplace(char *buf)
|
||||
#define ESCAPE_HEX 0x20
|
||||
|
||||
int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
|
||||
unsigned int flags, const char *esc);
|
||||
unsigned int flags, const char *only);
|
||||
|
||||
static inline int string_escape_mem_any_np(const char *src, size_t isz,
|
||||
char *dst, size_t osz, const char *esc)
|
||||
char *dst, size_t osz, const char *only)
|
||||
{
|
||||
return string_escape_mem(src, isz, dst, osz, ESCAPE_ANY_NP, esc);
|
||||
return string_escape_mem(src, isz, dst, osz, ESCAPE_ANY_NP, only);
|
||||
}
|
||||
|
||||
static inline int string_escape_str(const char *src, char *dst, size_t sz,
|
||||
unsigned int flags, const char *esc)
|
||||
unsigned int flags, const char *only)
|
||||
{
|
||||
return string_escape_mem(src, strlen(src), dst, sz, flags, esc);
|
||||
return string_escape_mem(src, strlen(src), dst, sz, flags, only);
|
||||
}
|
||||
|
||||
static inline int string_escape_str_any_np(const char *src, char *dst,
|
||||
size_t sz, const char *esc)
|
||||
size_t sz, const char *only)
|
||||
{
|
||||
return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, esc);
|
||||
return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, only);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user