summaryrefslogtreecommitdiffstats
path: root/libdwfl/linux-kernel-modules.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwfl/linux-kernel-modules.c')
-rw-r--r--libdwfl/linux-kernel-modules.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
index 6edb27f2..c0f8dfa4 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -924,7 +924,7 @@ dwfl_linux_kernel_module_section_address
924 924
925 if (!strcmp (secname, ".modinfo") 925 if (!strcmp (secname, ".modinfo")
926 || !strcmp (secname, ".data.percpu") 926 || !strcmp (secname, ".data.percpu")
927 || !strncmp (secname, ".exit", 5)) 927 || startswith (secname, ".exit"))
928 { 928 {
929 *addr = (Dwarf_Addr) -1l; 929 *addr = (Dwarf_Addr) -1l;
930 return DWARF_CB_OK; 930 return DWARF_CB_OK;
@@ -935,7 +935,7 @@ dwfl_linux_kernel_module_section_address
935 behavior, and this cruft leaks out into the /sys information. 935 behavior, and this cruft leaks out into the /sys information.
936 The file name for ".init*" may actually look like "_init*". */ 936 The file name for ".init*" may actually look like "_init*". */
937 937
938 const bool is_init = !strncmp (secname, ".init", 5); 938 const bool is_init = startswith (secname, ".init");
939 if (is_init) 939 if (is_init)
940 { 940 {
941 if (asprintf (&sysfile, SECADDRDIRFMT "_%s", 941 if (asprintf (&sysfile, SECADDRDIRFMT "_%s",