Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1352132

[PATCH] sctp: fix noderef.cocci warnings

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject [PATCH] sctp: fix noderef.cocci warnings
Date 2016-03-08 00:20 +0100
Message-ID <racBt-YH-33@gated-at.bofh.it> (permalink)
References <racBt-YH-35@gated-at.bofh.it> <raaJk-8cF-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


net/sctp/bind_addr.c:458:42-48: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

CC: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 bind_addr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/sctp/bind_addr.c
+++ b/net/sctp/bind_addr.c
@@ -455,7 +455,7 @@ static int sctp_copy_one_addr(struct net
 		    (((AF_INET6 == addr->sa.sa_family) &&
 		      (flags & SCTP_ADDR6_ALLOWED) &&
 		      (flags & SCTP_ADDR6_PEERSUPP))))
-			error = sctp_add_bind_addr(dest, addr, sizeof(addr),
+			error = sctp_add_bind_addr(dest, addr, sizeof(*addr),
 						   SCTP_ADDR_SRC, gfp);
 	}
 

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net] sctp: fix copying more bytes than expected in sctp_add_bind_addr Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2016-03-07 22:20 +0100
  [PATCH] sctp: fix noderef.cocci warnings kbuild test robot <lkp@intel.com> - 2016-03-08 00:20 +0100
  Re: [PATCH net] sctp: fix copying more bytes than expected in  sctp_add_bind_addr kbuild test robot <lkp@intel.com> - 2016-03-08 00:30 +0100

csiph-web