diff options
author | Max Kellermann <max@duempel.org> | 2008-10-09 19:20:05 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-09 19:20:05 +0200 |
commit | 4beba26c615ae88df81a9cb848c971594848fee4 (patch) | |
tree | 1d5cad4262c3917066ae45243727736a5ceb731e /src/update.c | |
parent | f1022bcc12dbdf5b7974fb1510197b12214fec32 (diff) | |
download | mpd-4beba26c615ae88df81a9cb848c971594848fee4.tar.gz mpd-4beba26c615ae88df81a9cb848c971594848fee4.tar.xz mpd-4beba26c615ae88df81a9cb848c971594848fee4.zip |
update: make the job id unsigned
Since the return value cannot be -1 anymore, we can make it unsigned.
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/update.c b/src/update.c index a962cca98..78bbf64b0 100644 --- a/src/update.c +++ b/src/update.c @@ -48,15 +48,16 @@ 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 song *delete; static struct condition delete_cond; -int isUpdatingDB(void) +unsigned +isUpdatingDB(void) { return (progress != UPDATE_PROGRESS_IDLE) ? update_task_id : 0; } @@ -428,12 +429,13 @@ 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; |