diff options
author | Martin Roth <martinroth@google.com> | 2016-08-29 15:30:23 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-09-15 02:27:42 +0200 |
commit | 96a48f148948d614900dbc51fdec0e3a5c7a35ee (patch) | |
tree | c641d246593f2ec28c04c9f527b5c94c2ebfdc20 /util | |
parent | ab9395f6125aa90a95b0932cb546bd494ef9194a (diff) |
checkpatch.pl: Force raw_line to return a defined value
Fixes the warning:
Use of uninitialized value in concatenation (.) or string at
util/lint/checkpatch.pl line 4739
Change-Id: Idc3c631735a595517d77cb8b8ec67e1ac00b6685
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16357
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/lint/checkpatch.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl index eb03bc7f30..646cb0f328 100755 --- a/util/lint/checkpatch.pl +++ b/util/lint/checkpatch.pl @@ -1495,7 +1495,13 @@ sub raw_line { $cnt--; } - return $line; + # coreboot: This probably shouldn't happen, but it does. + # Return a defined value so we don't get an error. + if (defined $line) { + return $line; + } else { + return ""; + } } sub cat_vet { |