check_whitespace: Minor simplification of control char check

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-07-27 12:55:41 -04:00
parent 7c7de85f01
commit ac5e207241
1 changed files with 2 additions and 3 deletions

View File

@ -36,10 +36,9 @@ def check_file(filename):
continue
# Check for control characters
for c in line:
oc = ord(c)
if oc < 32 or unicodedata.category(c).startswith('C'):
if unicodedata.category(c).startswith('C'):
char_name = repr(c)
if oc == 9:
if c == '\t':
if os.path.basename(filename).lower() == 'makefile':
continue
char_name = 'tab'