Use correct return value on error
This commit is contained in:
+2
-2
@@ -270,7 +270,7 @@ unsigned int uc_thread_queue_length(struct uc_threadqueue *queue)
|
||||
unsigned int length;
|
||||
|
||||
if (queue == NULL ) {
|
||||
return -EINVAL;
|
||||
return EINVAL;
|
||||
}
|
||||
// get the length properly
|
||||
pthread_mutex_lock(&queue->mutex);
|
||||
@@ -285,7 +285,7 @@ int uc_thread_queue_clear(struct uc_threadqueue *queue,
|
||||
void *cookie)
|
||||
{
|
||||
if (queue == NULL) {
|
||||
return -EINVAL;
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&queue->mutex);
|
||||
|
||||
Reference in New Issue
Block a user