提交 0e864b21 编写于 作者: D Dan Carpenter 提交者: David S. Miller

sctp: remove a redundant NULL check

It confuses Smatch when we check "sinit" for NULL and then non-NULL and
that causes a false positive warning later.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 963a1855
...@@ -1743,7 +1743,7 @@ static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, ...@@ -1743,7 +1743,7 @@ static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
* either the default or the user specified stream counts. * either the default or the user specified stream counts.
*/ */
if (sinfo) { if (sinfo) {
if (!sinit || (sinit && !sinit->sinit_num_ostreams)) { if (!sinit || !sinit->sinit_num_ostreams) {
/* Check against the defaults. */ /* Check against the defaults. */
if (sinfo->sinfo_stream >= if (sinfo->sinfo_stream >=
sp->initmsg.sinit_num_ostreams) { sp->initmsg.sinit_num_ostreams) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册