Skip to content

Commit

Permalink
checkpatch: Fix handling of line endings.
Browse files Browse the repository at this point in the history
Unlike manual splitting, 'splitlines' correctly handles different
line endings. Without this change script fails to check files with
'\r\n' endings treating the whole patch as a header.

Signed-off-by: Ilya Maximets <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
igsilya authored and blp committed Apr 15, 2019
1 parent ead9425 commit 4bee6d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities/checkpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def ovs_checkpatch_parse(text, filename, author=None, committer=None):

reset_counters()

for line in text.split('\n'):
for line in text.splitlines():
if current_file != previous_file:
previous_file = current_file

Expand Down

0 comments on commit 4bee6d8

Please sign in to comment.