diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-07-30 04:44:15 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-08-05 12:06:34 +0200 |
commit | b3e089cd446b26bb1e12860e1afb9da314453fd6 (patch) | |
tree | 94f0e816bed86c93cbd7d2d6ee36ac5fc05707b5 /arch/arm64/kernel | |
parent | ACPI/IORT: Rename arm_smmu_v3_set_proximity() 'node' local variable (diff) | |
download | linux-b3e089cd446b26bb1e12860e1afb9da314453fd6.tar.xz linux-b3e089cd446b26bb1e12860e1afb9da314453fd6.zip |
arm64: Replace strncmp with str_has_prefix
In commit b6b2735514bc
("tracing: Use str_has_prefix() instead of using fixed sizes")
the newly introduced str_has_prefix() was used
to replace error-prone strncmp(str, const, len).
Here fix codes with the same pattern.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/module-plts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c index 044c0ae4d6c8..b182442b87a3 100644 --- a/arch/arm64/kernel/module-plts.c +++ b/arch/arm64/kernel/module-plts.c @@ -302,7 +302,7 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, /* sort by type, symbol index and addend */ sort(rels, numrels, sizeof(Elf64_Rela), cmp_rela, NULL); - if (strncmp(secstrings + dstsec->sh_name, ".init", 5) != 0) + if (!str_has_prefix(secstrings + dstsec->sh_name, ".init")) core_plts += count_plts(syms, rels, numrels, sechdrs[i].sh_info, dstsec); else |