Remove an unnecessary check on socket restart
PATCH 1/1 Remove an unnecessary check on socket restart
This check is removed because it cannot be true because of the unsigned nature of the value being examined.
--- net/checkpoint.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
net/checkpoint.c +1 -2
@@ -484,8 +484,7 @@ static int sock_cptrst(struct ckpt_ctx *ctx, struct sock *sk, (h->sock.state >= TCP_MAX_STATES)) {ckpt_debug ("sock in invalid state: %i" , h->sock.state);return -EINVAL ; - } else if ((h->socket.state < SS_FREE) || - (h->socket.state > SS_DISCONNECTING)) { + } else if (h->socket.state > SS_DISCONNECTING) {ckpt_debug ("socket in invalid state: %i" , h->socket.state);return -EINVAL ;
Signature · 1 line
1.6.0.4
A message that is not in the archive (sent off-list or not yet received): 1254434651-6540-1-git-send-email-danms-r/[email protected]
Serge E. Hallyn
Acked-byQuoted 4 lines · Dan Smith
This check is removed because it cannot be true because of the unsigned nature of the value being examined.
Signed-off-by Dan Smith <danms-r/[email protected]>
Thanks. I actually do keep missing real errors bc of the noise (most of which comes from cred.h :( ), so I appreciate every bit they can be reduced.
Quoted 22 lines
Cc serue-r/[email protected]--- net/checkpoint.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)net/checkpoint.c +1
-2@@ -484,8 +484,7 @@ static int sock_cptrst(struct ckpt_ctx *ctx, struct sock *sk, (h->sock.state >= TCP_MAX_STATES)) {ckpt_debug ("sock in invalid state: %i" , h->sock.state);return -EINVAL ; - } else if ((h->socket.state < SS_FREE) || - (h->socket.state > SS_DISCONNECTING)) { + } else if (h->socket.state > SS_DISCONNECTING) {ckpt_debug ("socket in invalid state: %i" , h->socket.state);return -EINVAL ;Signature · 1 line
1.6.0.4
To appear in ckpt-v18-dev, thanks.
Quoted 24 lines · Dan Smith
This check is removed because it cannot be true because of the unsigned nature of the value being examined.
--- net/checkpoint.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)net/checkpoint.c +1
-2@@ -484,8 +484,7 @@ static int sock_cptrst(struct ckpt_ctx *ctx, struct sock *sk, (h->sock.state >= TCP_MAX_STATES)) {ckpt_debug ("sock in invalid state: %i" , h->sock.state);return -EINVAL ; - } else if ((h->socket.state < SS_FREE) || - (h->socket.state > SS_DISCONNECTING)) { + } else if (h->socket.state > SS_DISCONNECTING) {ckpt_debug ("socket in invalid state: %i" , h->socket.state);return -EINVAL ;