From a6f128a5786244fdd7b1d12c4b20ce90736b8767 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 5 Oct 2014 13:22:28 +0200 Subject: [PATCH] lib/plist.c: CID 62704 (argument cannot be negative) --- lib/plist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plist.c b/lib/plist.c index 1bb8bcd0..9eb6ab64 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -98,7 +98,7 @@ xbps_array_foreach_cb_multi(struct xbps_handle *xhp, return 0; maxthreads = (int)sysconf(_SC_NPROCESSORS_ONLN); - if (maxthreads == 1) /* use single threaded routine */ + if (maxthreads < 0 || maxthreads == 1) /* use single threaded routine */ return xbps_array_foreach_cb(xhp, array, dict, fn, arg); thd = calloc(maxthreads, sizeof(*thd));