X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=debugger.c;h=0febf170d729167b6697f18fffaae467d8c84259;hb=a11b2f0f2d984b7f5974aff01c9fa80718449766;hp=5cb38ac444e35d774152b64973790c4fd5ec7f4d;hpb=0f314c0c99befea599a68bea51d759b4133efef6;p=notmuch diff --git a/debugger.c b/debugger.c index 5cb38ac4..0febf170 100644 --- a/debugger.c +++ b/debugger.c @@ -32,13 +32,14 @@ bool debugger_is_active (void) { char buf[1024]; + char buf2[1024]; if (RUNNING_ON_VALGRIND) return true; sprintf (buf, "/proc/%d/exe", getppid ()); - if (readlink (buf, buf, sizeof (buf)) != -1 && - strncmp (basename (buf), "gdb", 3) == 0) + if (readlink (buf, buf2, sizeof (buf2)) != -1 && + strncmp (basename (buf2), "gdb", 3) == 0) { return true; }