From: Roel Kluin <roel.kluin@gmail.com>
To: jreuter@yaina.de, linux-hams@vger.kernel.org
Subject: ax25: non working tests on unsigned ax25_ctl.arg
Date: Tue, 21 Apr 2009 14:55:23 +0200 [thread overview]
Message-ID: <49EDC23B.4070900@gmail.com> (raw)
vi include/linux/ax25.h +77
and note that ax25_ctl.arg is unsigned, should there maybe be a test
if (ax25_ctl.arg > MAX)
return -EINVAL;
(and what should MAX be then?)
Otherwise you may want to apply the cleanup patch below
Roel
------------------------------>8-------------8<---------------------------------
Remove redundant tests on unsigned
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index fd9d06f..9964df3 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -418,14 +418,10 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)
break;
case AX25_T3:
- if (ax25_ctl.arg < 0)
- return -EINVAL;
ax25->t3 = ax25_ctl.arg * HZ;
break;
case AX25_IDLE:
- if (ax25_ctl.arg < 0)
- return -EINVAL;
ax25->idle = ax25_ctl.arg * 60 * HZ;
break;
reply other threads:[~2009-04-21 12:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49EDC23B.4070900@gmail.com \
--to=roel.kluin@gmail.com \
--cc=jreuter@yaina.de \
--cc=linux-hams@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox