Slirp updates

Dr. David Alan Gilbert (1):
   slirp: Gcc 9 -O3 fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIyBAABCgAdFiEE5h27FdQXK97JfpLZ21UOifD6VPMFAly0x/MACgkQ21UOifD6
 VPOLBQ/3UNeMla5djuv7ZnsQdGUoaRbZiHRIIFm5S30tpX7DozRd/Wtx9Cyt2+/w
 GsfnNR+7b+rtzfYFqaBlU5RTsd6pqThX9ODcZ/80ecOn8RCgdjeipH7sZpj9wYne
 xjO+23SpWmKgnO798JmJou9w/URX4tmp9tqZJF1722BAbcgd48vIlztHl0gAaypP
 bytSvTmxuTmERLsuKJ6NbrEVM3W19upHEeUuCj3wmB50oU3WCoUcIkolfd7WUQ8D
 lMjkATFMa8lC0+feIo7ICNOeD/9Z9vRn+ffmPj9+Gt8aLI/8akzxIIYNGBKcnT2C
 ERkQFAOlZ34a39xcWMqJOOWFUonM+nEYrw3Fg6CHEREXuRMOp3fV1kKS+xq4jUf+
 miRxqw5jEcPYyxATfYFYcfIXSaKGSlaQ4UGjVANNUN8tLC1FKod5xD3KfDxik+3o
 SeLXrPRNrkHcj1OcpHNzL+mhnMvu9reLWiV/VccmgN6YAugPm19R7r3bLqbcCIkT
 jWzT2/AFg+L+ShAHyZVwbFeepI1CYx2ZstAmpX2VYYg4l7IUfozoOG8SwEn31MI9
 yQ9ZUfe4v8mPIzEMnZlgF9w6gclSfxSR3lKOB1TWnRGgyLIo0GAphQieWNajzM8g
 rUM+b8FGJWlXoLBT2nMOq0Va3zUiqeRTG2iyypBA7aASmYpmdw==
 =qwoq
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging

Slirp updates

Dr. David Alan Gilbert (1):
  slirp: Gcc 9 -O3 fix

# gpg: Signature made Mon 15 Apr 2019 19:05:39 BST
# gpg:                using RSA key E61DBB15D4172BDEC97E92D9DB550E89F0FA54F3
# gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>" [unknown]
# gpg:                 aka "Samuel Thibault <sthibault@debian.org>" [marginal]
# gpg:                 aka "Samuel Thibault <samuel.thibault@gnu.org>" [unknown]
# gpg:                 aka "Samuel Thibault <samuel.thibault@inria.fr>" [marginal]
# gpg:                 aka "Samuel Thibault <samuel.thibault@labri.fr>" [marginal]
# gpg:                 aka "Samuel Thibault <samuel.thibault@ens-lyon.org>" [marginal]
# gpg:                 aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>" [unknown]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#      Subkey fingerprint: E61D BB15 D417 2BDE C97E  92D9 DB55 0E89 F0FA 54F3

* remotes/thibault/tags/samuel-thibault:
  slirp: Gcc 9 -O3 fix

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2019-04-16 09:27:35 +01:00
commit 677746b39f

View File

@ -171,6 +171,7 @@ int
soread(struct socket *so)
{
int n, nn;
size_t buf_len;
struct sbuf *sb = &so->so_snd;
struct iovec iov[2];
@ -181,7 +182,8 @@ soread(struct socket *so)
* No need to check if there's enough room to read.
* soread wouldn't have been called if there weren't
*/
sopreprbuf(so, iov, &n);
buf_len = sopreprbuf(so, iov, &n);
assert(buf_len != 0);
nn = recv(so->s, iov[0].iov_base, iov[0].iov_len,0);
if (nn <= 0) {
@ -257,6 +259,7 @@ int soreadbuf(struct socket *so, const char *buf, int size)
* No need to check if there's enough room to read.
* soread wouldn't have been called if there weren't
*/
assert(size > 0);
if (sopreprbuf(so, iov, &n) < size)
goto err;