From c4732b835f7157cb7544e1a66a03dd8d1a8316bc Mon Sep 17 00:00:00 2001 From: chme Date: Fri, 9 Dec 2016 16:20:50 +0100 Subject: [PATCH] [db] Remove unused function db_file_id_byfilebase --- src/db.c | 25 ------------------------- src/db.h | 3 --- 2 files changed, 28 deletions(-) diff --git a/src/db.c b/src/db.c index dc140d82..f93747f9 100644 --- a/src/db.c +++ b/src/db.c @@ -2232,31 +2232,6 @@ db_file_id_bymatch(char *path) #undef Q_TMPL } -//TODO [cleanup] unused function(?) -int -db_file_id_byfilebase(char *filename, char *base) -{ -#define Q_TMPL "SELECT f.id FROM files f WHERE f.path LIKE '%q/%%/%q';" - char *query; - int ret; - - query = sqlite3_mprintf(Q_TMPL, base, filename); - if (!query) - { - DPRINTF(E_LOG, L_DB, "Out of memory for query string\n"); - - return 0; - } - - ret = db_file_id_byquery(query); - - sqlite3_free(query); - - return ret; - -#undef Q_TMPL -} - int db_file_id_byfile(char *filename) { diff --git a/src/db.h b/src/db.h index 47e212f6..5136d937 100644 --- a/src/db.h +++ b/src/db.h @@ -522,9 +522,6 @@ db_file_id_bypath(char *path); int db_file_id_bymatch(char *path); -int -db_file_id_byfilebase(char *filename, char *base); - int db_file_id_byfile(char *filename);