diff options
author | 2007-05-18 19:28:50 +0000 | |
---|---|---|
committer | 2007-05-18 19:28:50 +0000 | |
commit | a957724c2202fdc0d6fa9d71c8f9ce83dbd146a5 (patch) | |
tree | 0bf5d632662aaa2385a6aeb9851d1f24d32d83ac /lib/libpthread/uthread/uthread_priority_queue.c | |
parent | Fix mismerge; remove statement without effect. OK otto@ pedro@ (diff) | |
download | wireguard-openbsd-a957724c2202fdc0d6fa9d71c8f9ce83dbd146a5.tar.xz wireguard-openbsd-a957724c2202fdc0d6fa9d71c8f9ce83dbd146a5.zip |
Eliminate many lint warnings by either: using the appropriate type,
casting when safe or adding ARGSUSED where needed. Reviewed and
improvements from millert@ and marc@. okay marc@
Diffstat (limited to 'lib/libpthread/uthread/uthread_priority_queue.c')
-rw-r--r-- | lib/libpthread/uthread/uthread_priority_queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/uthread/uthread_priority_queue.c b/lib/libpthread/uthread/uthread_priority_queue.c index 918ff694aec..a9fe248f704 100644 --- a/lib/libpthread/uthread/uthread_priority_queue.c +++ b/lib/libpthread/uthread/uthread_priority_queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_priority_queue.c,v 1.4 2001/09/04 23:28:31 fgsch Exp $ */ +/* $OpenBSD: uthread_priority_queue.c,v 1.5 2007/05/18 19:28:50 kurt Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -89,12 +89,12 @@ _pq_alloc(pq_queue_t *pq, int minprio, int maxprio) int ret = 0; int prioslots = maxprio - minprio + 1; - if (pq == NULL) + if (pq == NULL || prioslots < 1) ret = -1; /* Create the priority queue with (maxprio - minprio + 1) slots: */ else if ((pq->pq_lists = - (pq_list_t *) malloc(sizeof(pq_list_t) * prioslots)) == NULL) + (pq_list_t *) malloc(sizeof(pq_list_t) * (size_t)prioslots)) == NULL) ret = -1; else { |