lib/plist.c: CID 62704 (argument cannot be negative)

This commit is contained in:
Juan RP 2014-10-05 13:22:28 +02:00
parent b96d1c9f4e
commit a6f128a578

View File

@ -98,7 +98,7 @@ xbps_array_foreach_cb_multi(struct xbps_handle *xhp,
return 0; return 0;
maxthreads = (int)sysconf(_SC_NPROCESSORS_ONLN); 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); return xbps_array_foreach_cb(xhp, array, dict, fn, arg);
thd = calloc(maxthreads, sizeof(*thd)); thd = calloc(maxthreads, sizeof(*thd));