From a1e417c57143ab520fa04d93aff4cbe80a074272 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Tue, 26 May 2015 21:24:10 +0200 Subject: [PATCH] Rename count_info to fix issue #157 --- src/db.c | 8 ++++---- src/db.h | 4 ++-- src/mpd.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/db.c b/src/db.c index 7c5823da..f5fe873f 100644 --- a/src/db.c +++ b/src/db.c @@ -1801,11 +1801,11 @@ db_query_fetch_group(struct query_params *qp, struct db_group_info *dbgri) } int -db_query_fetch_count(struct query_params *qp, struct count_info *ci) +db_query_fetch_count(struct query_params *qp, struct filecount_info *fci) { int ret; - memset(ci, 0, sizeof(struct count_info)); + memset(fci, 0, sizeof(struct filecount_info)); if (!qp->stmt) { @@ -1831,8 +1831,8 @@ db_query_fetch_count(struct query_params *qp, struct count_info *ci) return -1; } - ci->count = sqlite3_column_int(qp->stmt, 0); - ci->length = sqlite3_column_int(qp->stmt, 1); + fci->count = sqlite3_column_int(qp->stmt, 0); + fci->length = sqlite3_column_int(qp->stmt, 1); return 0; } diff --git a/src/db.h b/src/db.h index abfad9f0..4b8faefe 100644 --- a/src/db.h +++ b/src/db.h @@ -345,7 +345,7 @@ struct watch_enum { sqlite3_stmt *stmt; }; -struct count_info { +struct filecount_info { uint32_t count; uint32_t length; }; @@ -402,7 +402,7 @@ int db_query_fetch_group(struct query_params *qp, struct db_group_info *dbgri); int -db_query_fetch_count(struct query_params *qp, struct count_info *ci); +db_query_fetch_count(struct query_params *qp, struct filecount_info *fci); int db_query_fetch_string(struct query_params *qp, char **string); diff --git a/src/mpd.c b/src/mpd.c index d22ea6e8..a51577d9 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -2185,7 +2185,7 @@ static int mpd_command_count(struct evbuffer *evbuf, int argc, char **argv, char **errmsg) { struct query_params qp; - struct count_info ci; + struct filecount_info fci; int ret; if (argc < 3 || ((argc - 1) % 2) != 0) @@ -2213,7 +2213,7 @@ mpd_command_count(struct evbuffer *evbuf, int argc, char **argv, char **errmsg) return ACK_ERROR_UNKNOWN; } - ret = db_query_fetch_count(&qp, &ci); + ret = db_query_fetch_count(&qp, &fci); if (ret < 0) { db_query_end(&qp); @@ -2227,8 +2227,8 @@ mpd_command_count(struct evbuffer *evbuf, int argc, char **argv, char **errmsg) evbuffer_add_printf(evbuf, "songs: %d\n" "playtime: %d\n", - ci.count, - (ci.length / 1000)); + fci.count, + (fci.length / 1000)); db_query_end(&qp);