]> git.sesse.net Git - plocate/blobdiff - plocate.cpp
Add debug output if io_uring initialization fails.
[plocate] / plocate.cpp
index c914002ff87b3bcbd61b0ad02d9d0cd81da03554..66dfa918728ff7248f0705a92b857bca20e9ad62 100644 (file)
@@ -1,4 +1,5 @@
 #include "db.h"
+#include "dprintf.h"
 #include "io_uring_engine.h"
 #include "parse_trigrams.h"
 #include "turbopfor.h"
 using namespace std;
 using namespace std::chrono;
 
-#define dprintf(...) \
-       do { \
-               if (use_debug) { \
-                       fprintf(stderr, __VA_ARGS__); \
-               } \
-       } while (false)
-
 #define DEFAULT_DBPATH "/var/lib/mlocate/plocate.db"
 
 const char *dbpath = DEFAULT_DBPATH;
@@ -709,7 +703,6 @@ int main(int argc, char **argv)
                Needle needle;
                needle.str = argv[i];
 
-
                // See if there are any wildcard characters, which indicates we should treat it
                // as an (anchored) glob.
                bool any_wildcard = false;