On 20/02/2017 21:16, Dr. David Alan Gilbert wrote: >> p.has_max_bandwidth = true; >> ret = qemu_strtosz_mebi(valuestr, NULL, &valuebw); >> - if (ret < 0 || (size_t)valuebw != valuebw) { >> + if (ret < 0 || valuebw > INT64_MAX >> + || (size_t)valuebw != valuebw) { > > We should probably just turn all of the parameters into size_t's - although > that's > more work and there's some int64_t's in qemu_file for no good reason.
I disagree, there's no reason why 32-bit should not support a bandwidth specification of 10 Gbps. size_t is related to pointers, and it should only be used for those. Paolo