2016-11-24 14:17 GMT+03:00 David Howells <dhowells@xxxxxxxxxx>: > David Howells <dhowells@xxxxxxxxxx> wrote: > >> + if (!rp) { >> + if (mpi_resize(res, 1) < 0) > > This is better done with RESIZE_IF_NEEDED(). > mpi_resize() is equal to RESIZE_IF_NEEDED(), it also checks for allocated space: int mpi_resize(MPI a, unsigned nlimbs) { .... if (nlimbs <= a->alloced) return 0; /* no need to do it */ > David -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html