aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-09 19:20:05 +0200
committerEric Wong <normalperson@yhbt.net>2008-10-11 19:21:51 -0700
commite3ac6a123a442cf9d1f9147b122f21a1f3f1ebb2 (patch)
treeb95dcfd1ea1e2b78b9c07371a3ce3a61aec9a7e7 /src/update.c
parent1d59716731f3ed8569d60ae84c291bd93eb7d582 (diff)
downloadmpd-e3ac6a123a442cf9d1f9147b122f21a1f3f1ebb2.tar.gz
mpd-e3ac6a123a442cf9d1f9147b122f21a1f3f1ebb2.tar.xz
mpd-e3ac6a123a442cf9d1f9147b122f21a1f3f1ebb2.zip
update: make the job id unsigned
Since the return value cannot be -1 anymore, we can make it unsigned.
Diffstat (limited to '')
-rw-r--r--src/update.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/update.c b/src/update.c
index 7dc50b5aa..68e030b78 100644
--- a/src/update.c
+++ b/src/update.c
@@ -46,15 +46,15 @@ static size_t update_paths_nr;
static pthread_t update_thr;
-static const int update_task_id_max = 1 << 15;
+static const unsigned update_task_id_max = 1 << 15;
-static int update_task_id;
+static unsigned update_task_id;
static struct mpd_song *delete;
static struct condition delete_cond;
-int isUpdatingDB(void)
+unsigned isUpdatingDB(void)
{
return (progress != UPDATE_PROGRESS_IDLE) ? update_task_id : 0;
}
@@ -410,12 +410,12 @@ static void spawn_update_task(char *path)
DEBUG("spawned thread for update job id %i\n", update_task_id);
}
-int directory_update_init(char *path)
+unsigned directory_update_init(char *path)
{
assert(pthread_equal(pthread_self(), main_task));
if (progress != UPDATE_PROGRESS_IDLE) {
- int next_task_id;
+ unsigned next_task_id;
if (!path)
return 0;