cifs: clean up length checks in check2ndT2
authorJeff Layton <jlayton@redhat.com>
Thu, 31 Mar 2011 21:32:54 +0000 (17:32 -0400)
committerSteve French <sfrench@us.ibm.com>
Tue, 12 Apr 2011 00:56:46 +0000 (00:56 +0000)
commitc0c7b905e911a1f1faf515a24e849d4ffcdd0a8a
tree8449fe54d28dc94b78ec43d48c99300c023f2de0
parent2b6c26a0a62cc0bab0ad487533d5581d7c293fef
cifs: clean up length checks in check2ndT2

Thus spake David Howells:

The code that follows this:

   remaining = total_data_size - data_in_this_rsp;
if (remaining == 0)
return 0;
else if (remaining < 0) {

generates better code if you drop the 'remaining' variable and compare
the values directly.

Clean it up per his recommendation...

Reported-and-acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c