summaryrefslogtreecommitdiff
path: root/crypto/algif_aead.c
diff options
context:
space:
mode:
authorLABBE Corentin <clabbe.montjoie@gmail.com>2015-10-23 14:10:36 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-11-17 21:58:37 +0800
commita495eea64280ffa1f0ab0e1c98f7e51be5db0bdc (patch)
tree45a48f0c01a0878078be156445b4d28e332337ff /crypto/algif_aead.c
parentd3dd09594f91ee57e76cbc27023b214afa01a99a (diff)
downloadlinux-crypto-a495eea64280ffa1f0ab0e1c98f7e51be5db0bdc.tar.gz
linux-crypto-a495eea64280ffa1f0ab0e1c98f7e51be5db0bdc.zip
crypto: algif - Change some variable to size_t
Some variable are set as int but store only positive values. Furthermore there are used in operation/function that wait for unsigned value. This patch set them as size_t. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--crypto/algif_aead.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 0aa6fdfb..f70bcf84 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -213,7 +213,7 @@ static int aead_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
}
while (size) {
- unsigned long len = size;
+ size_t len = size;
struct scatterlist *sg = NULL;
/* use the existing memory in an allocated page */
@@ -247,7 +247,7 @@ static int aead_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
/* allocate a new page */
len = min_t(unsigned long, size, aead_sndbuf(sk));
while (len) {
- int plen = 0;
+ size_t plen = 0;
if (sgl->cur >= ALG_MAX_PAGES) {
aead_put_sgl(sk);
@@ -256,7 +256,7 @@ static int aead_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
}
sg = sgl->sg + sgl->cur;
- plen = min_t(int, len, PAGE_SIZE);
+ plen = min_t(size_t, len, PAGE_SIZE);
sg_assign_page(sg, alloc_page(GFP_KERNEL));
err = -ENOMEM;