]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Fix ASSERTCMP and ASSERTIFCMP to handle signed values
authorDavid Howells <dhowells@redhat.com>
Thu, 8 Sep 2016 10:10:11 +0000 (11:10 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 8 Sep 2016 10:10:11 +0000 (11:10 +0100)
commit66f26b401424e98276f1efbdb4918eea2c1edf4f
tree6d2b363fc9413a7a65582b02fa12ad96988e3a1e
parente42937cbc333ae21ba91638e18462a903138a4c3
rxrpc: Fix ASSERTCMP and ASSERTIFCMP to handle signed values

Fix ASSERTCMP and ASSERTIFCMP to be able to handle signed values by casting
both parameters to the type of the first before comparing.  Without this,
both values are cast to unsigned long, which means that checks for values
less than zero don't work.

The downside of this is that the state enum values in struct rxrpc_call and
struct rxrpc_connection can't be bitfields as __typeof__ can't handle them.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/ar-internal.h