diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-11 22:05:45 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-18 09:37:39 +0900 |
commit | 87b95a81357dd6ec679a786cebfe34d0e797f752 (patch) | |
tree | 4ff8959f557331f671428f59bc7a19e544be8708 /mm/zbud.c | |
parent | 5d1ef76f5a22ea07120671c5fcddafd365000cc9 (diff) |
fixdep: refactor parse_dep_file()
parse_dep_file() has too much indentation, and puts the code far to
the right. This commit refactors the code and reduces the one level
of indentation.
strrcmp() computes 'slen' by itself, but the caller already knows the
length of the token, so 'slen' can be passed via function argument.
With this, we can swap the order of strrcmp() and "*p = \0;"
Also, strrcmp() is an ambiguous function name. Flip the logic and
rename it to str_ends_with().
I added a new helper is_ignored_file() - this returns 1 if the token
represents a file that should be ignored.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'mm/zbud.c')
0 files changed, 0 insertions, 0 deletions