Use correct return value on error

This commit is contained in:
Nils O. Selåsdal
2014-09-29 16:16:55 +02:00
parent 749c5ef0df
commit 959d525938
+2 -2
View File
@@ -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);