diff options
author | Max Kellermann <max@duempel.org> | 2008-10-09 19:17:44 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:51 -0700 |
commit | 1d59716731f3ed8569d60ae84c291bd93eb7d582 (patch) | |
tree | 6c8e6e5e43190d98264f7c734102af7bb5e4ec96 /src/update.c | |
parent | e5c747982adfae06c51b60819ec6a4ef5a34ffe2 (diff) | |
download | mpd-1d59716731f3ed8569d60ae84c291bd93eb7d582.tar.gz mpd-1d59716731f3ed8569d60ae84c291bd93eb7d582.tar.xz mpd-1d59716731f3ed8569d60ae84c291bd93eb7d582.zip |
update: job ID must be positive
The documentation for directory_update_init() was incorrect: a job ID
must be positive, not non-negative. If the update queue is full and
no job was created, it makes more sense to return 0 instead of -1,
because it is more consistent with the return value of isUpdatingDB().
Diffstat (limited to '')
-rw-r--r-- | src/update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/update.c b/src/update.c index f5619a1d4..7dc50b5aa 100644 --- a/src/update.c +++ b/src/update.c @@ -418,9 +418,9 @@ int directory_update_init(char *path) int next_task_id; if (!path) - return -1; + return 0; if (update_paths_nr == ARRAY_SIZE(update_paths)) - return -1; + return 0; assert(update_paths_nr < ARRAY_SIZE(update_paths)); update_paths[update_paths_nr++] = path; next_task_id = update_task_id + update_paths_nr; |