Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libexecinfo execinfo: Fix mistake in previous: mat...



details:   https://anonhg.NetBSD.org/src/rev/1953e0ae724a
branches:  trunk
changeset: 368664:1953e0ae724a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Jul 25 11:02:41 2022 +0000

description:
execinfo: Fix mistake in previous: match `the_loop*' as prefix.

Now that there are two functions we need to catch either one.

diffstat:

 tests/lib/libexecinfo/t_sig_backtrace.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4a73e377c5bf -r 1953e0ae724a tests/lib/libexecinfo/t_sig_backtrace.c
--- a/tests/lib/libexecinfo/t_sig_backtrace.c   Mon Jul 25 10:38:17 2022 +0000
+++ b/tests/lib/libexecinfo/t_sig_backtrace.c   Mon Jul 25 11:02:41 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_sig_backtrace.c,v 1.3 2022/07/25 10:38:17 riastradh Exp $    */
+/*     $NetBSD: t_sig_backtrace.c,v 1.4 2022/07/25 11:02:41 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_sig_backtrace.c,v 1.3 2022/07/25 10:38:17 riastradh Exp $");
+__RCSID("$NetBSD: t_sig_backtrace.c,v 1.4 2022/07/25 11:02:41 riastradh Exp $");
 
 #include <sys/mman.h>
 #include <execinfo.h>
@@ -155,7 +155,7 @@
                        continue;
                }
                if (found_sigtramp && !found_the_loop &&
-                   strcmp(strings[i], "the_loop") == 0) {
+                   strncmp(strings[i], "the_loop", strlen("the_loop")) == 0) {
                        found_the_loop = true;
                        continue;
                }



Home | Main Index | Thread Index | Old Index