ChangeSet 1.2199.13.4, 2005/03/25 00:26:46+01:00, [EMAIL PROTECTED]

        [Bluetooth] Fix signedness problem at socket creation
        
        This patch fixes a small signedness problem when creating the
        socket.
        
        Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]>



 af_bluetooth.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
--- a/net/bluetooth/af_bluetooth.c      2005-03-26 17:26:11 -08:00
+++ b/net/bluetooth/af_bluetooth.c      2005-03-26 17:26:11 -08:00
@@ -62,7 +62,7 @@
 
 int bt_sock_register(int proto, struct net_proto_family *ops)
 {
-       if (proto >= BT_MAX_PROTO)
+       if (proto < 0 || proto >= BT_MAX_PROTO)
                return -EINVAL;
 
        if (bt_proto[proto])
@@ -75,7 +75,7 @@
 
 int bt_sock_unregister(int proto)
 {
-       if (proto >= BT_MAX_PROTO)
+       if (proto < 0 || proto >= BT_MAX_PROTO)
                return -EINVAL;
 
        if (!bt_proto[proto])
@@ -90,7 +90,7 @@
 {
        int err = 0;
 
-       if (proto >= BT_MAX_PROTO)
+       if (proto < 0 || proto >= BT_MAX_PROTO)
                return -EINVAL;
 
 #if defined(CONFIG_KMOD)
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to