X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=debugger.c;h=0febf170d729167b6697f18fffaae467d8c84259;hb=9024b2f5f6094d145e06883027b08ad0011023ff;hp=5cb38ac444e35d774152b64973790c4fd5ec7f4d;hpb=040c3236afcf95bead0324a48c2e0b9cd7934993;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; }