summaryrefslogtreecommitdiffstats
path: root/src/strip.c
diff options
context:
space:
mode:
authorMartin Liska <[email protected]>2021-04-19 14:33:36 +0200
committerMark Wielaard <[email protected]>2021-05-12 11:56:57 +0200
commitadc201f81902f3015a841869756ed4b9b811fe33 (patch)
tree735ab647b6e749f7bbbd1cd88256f89c2de266a9 /src/strip.c
parent857546d176a36d2b5dc18b81dcafa3fb8ec0123d (diff)
Come up with startswith function.
New function in system.h that returns true if a string has a given prefix, false otherwise. Use it in place of strncmp. Signed-off-by: Martin Liška <[email protected]>
Diffstat (limited to 'src/strip.c')
-rw-r--r--src/strip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strip.c b/src/strip.c
index 7a5d4e4c..70fc8c03 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -607,7 +607,7 @@ remove_debug_relocations (Ebl *ebl, Elf *elf, GElf_Ehdr *ehdr,
GElf_Chdr tchdr;
int tcompress_type = 0;
bool is_gnu_compressed = false;
- if (strncmp (tname, ".zdebug", strlen ("zdebug")) == 0)
+ if (startswith (tname, ".zdebug"))
{
is_gnu_compressed = true;
if (elf_compress_gnu (tscn, 0, 0) != 1)