Use common is_ctrl_char() helper function

This modifies couple of code segments that replaced control characters
in strings with '_' to use a common helper function.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-04-07 15:43:32 +03:00 committed by Jouni Malinen
parent f371869a96
commit 0f5acfba06
4 changed files with 11 additions and 4 deletions

View file

@ -1088,3 +1088,9 @@ size_t utf8_escape(const char *inp, size_t in_size,
return res_size;
}
int is_ctrl_char(char c)
{
return c > 0 && c < 32;
}