## @file\r
# Check a patch for various format issues\r
#\r
-# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made\r
# available under the terms and conditions of the BSD License which\r
if line.startswith('@@ '):\r
self.state = PRE_PATCH\r
elif len(line) >= 1 and line[0] not in ' -+' and \\r
- not line.startswith(r'\ No newline '):\r
+ not line.startswith(r'\ No newline ') and not self.binary:\r
for line in self.lines[self.line_num + 1:]:\r
if line.startswith('diff --git'):\r
self.format_error('diff found after end of patch')\r
elif self.state == PATCH:\r
if self.binary:\r
pass\r
- if line.startswith('-'):\r
+ elif line.startswith('-'):\r
pass\r
elif line.startswith('+'):\r
self.check_added_line(line[1:])\r