]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
lib/mpi: mpi_write_sgl(): fix style issue with lzero decrement
authorNicolai Stange <nicstange@gmail.com>
Tue, 22 Mar 2016 12:12:36 +0000 (13:12 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 5 Apr 2016 12:35:46 +0000 (20:35 +0800)
commit654842ef53d7820129a751f5cc620e5a69c694a9
tree46a1c898fcaa82c8604e34ec2b4d3f396a6d369d
parentf2d1362ff7d266b3d2b1c764d6c2ef4a3b457f23
lib/mpi: mpi_write_sgl(): fix style issue with lzero decrement

Within the copying loop in mpi_write_sgl(), we have

  if (lzeros > 0) {
    ...
    lzeros -= sizeof(alimb);
  }

However, at this point, lzeros < sizeof(alimb) holds. Make this fact
explicit by rewriting the above to

  if (lzeros) {
    ...
    lzeros = 0;
  }

Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
lib/mpi/mpicoder.c