]> git.notmuchmail.org Git - notmuch/blobdiff - debugger.c
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / debugger.c
index 0fa0fb6bda23881ed9c01b42f974f6e4b652526b..5f47a1d77d9f45f8adf4e16c9872b88b692c7e75 100644 (file)
 #define RUNNING_ON_VALGRIND 0
 #endif
 
 #define RUNNING_ON_VALGRIND 0
 #endif
 
-notmuch_bool_t
+bool
 debugger_is_active (void)
 {
     char buf[1024];
 debugger_is_active (void)
 {
     char buf[1024];
+    char buf2[1024];
 
     if (RUNNING_ON_VALGRIND)
 
     if (RUNNING_ON_VALGRIND)
-       return TRUE;
+       return true;
 
     sprintf (buf, "/proc/%d/exe", getppid ());
 
     sprintf (buf, "/proc/%d/exe", getppid ());
-    if (readlink (buf, buf, sizeof (buf)) != -1 &&
-       strncmp (basename (buf), "gdb", 3) == 0)
-    {
-       return TRUE;
+    if (readlink (buf, buf2, sizeof (buf2)) != -1 &&
+       strncmp (basename (buf2), "gdb", 3) == 0) {
+       return true;
     }
 
     }
 
-    return FALSE;
+    return false;
 }
 }