|
From: Peter K. <pk...@us...> - 2001-04-18 15:47:16
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.140 1.141=20=20=20=20=20=20=20=20=20=20=20
hci_vendor.c 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20
l2cap_con.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20
rfcomm.c 1.104 1.105=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Replaced -=3D1 and +=3D1 with -- and ++.
The diff of the modified file(s):
--- hci.c 2001/04/18 00:53:37 1.140
+++ hci.c 2001/04/18 15:47:13 1.141
@@ -391,8 +391,8 @@
*/
return;
}
- buf +=3D 1;
- count -=3D 1;
+ buf++;
+ count--;
break;
=20
/* If it is an event packet we wait for the next byte
@@ -401,16 +401,16 @@
D_STATE(__FUNCTION__", WAIT_FOR_EVENT_TYPE\n");
event_type =3D *buf;
state =3D WAIT_FOR_EVENT_LENGTH;
- buf +=3D 1;
- count -=3D 1;=20=20
+ buf++;
+ count--;
break;
=20
/* If it is an event the length-field is one byte */
case WAIT_FOR_EVENT_LENGTH:
D_STATE(__FUNCTION__", WAIT_FOR_EVENT_LENGTH\n");
event_len =3D *buf;
- buf +=3D 1;
- count -=3D 1;
+ buf++;
+ count--;
=20
/* If we don't check this and the lower level driver
gives us some trashed values then we might write
@@ -492,7 +492,7 @@
D_REC(__FUNCTION__", cont frame\n");
in_buf =3D get_inbuffer(hci_hdl);
if (in_buf) {
- in_buf->nbr_of_hci_pkt +=3D 1;
+ in_buf->nbr_of_hci_pkt++;
}
}
=20
@@ -679,7 +679,7 @@
if (j >=3D inq_res->nbr_of_units) {
memcpy(inq_res->bd_addr +=20
inq_res->nbr_of_units * 6, tmp_bd, 6);
- inq_res->nbr_of_units +=3D 1;
+ inq_res->nbr_of_units++;
}
}
break;
@@ -692,7 +692,7 @@
D_CMD(__FUNCTION__", CONNECTION_COMPLETE: %s\n",
get_err_msg(buf[0]));
=20
- hci_ctrl.nbr_of_connections +=3D 1;
+ hci_ctrl.nbr_of_connections++;
=20
link_type =3D buf[9];
hci_hdl =3D CHAR2INT12(buf[2], buf[1]);
@@ -706,7 +706,7 @@
/* remove hci handle if connection failed */
DSYS(__FUNCTION__", CONNECTION_COMPLETE %s\n",=20
get_err_msg(buf[0]));
- hci_ctrl.nbr_of_connections -=3D 1;
+ hci_ctrl.nbr_of_connections--;
reset_hci_con_bd(hci_hdl);
} else {
DSYS(__FUNCTION__", ACL link is up\n");
@@ -757,7 +757,7 @@
connection handle, if we only support point-to-point
connections we can acl_num by reading the buffersizes again,
but this will not work in a multipoint connection. */
- hci_ctrl.nbr_of_connections -=3D 1;
+ hci_ctrl.nbr_of_connections--;
=20
reset_hci_con_bd(CHAR2INT12(buf[2], buf[1]));
=20=09=09
@@ -1898,8 +1898,7 @@
=20
memcpy(c_pkt.data, bd, 6);
c +=3D 6;
- c_pkt.data[c] =3D reason;
- c +=3D 1;
+ c_pkt.data[c++] =3D reason;
c_pkt.len =3D c;
=20
return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
@@ -1971,8 +1970,7 @@
=20
memcpy(c_pkt.data, bd, 6);
c +=3D 6;
- c_pkt.data[c] =3D pin_len;
- c +=3D 1;
+ c_pkt.data[c++] =3D pin_len;
memcpy(c_pkt.data + c, pin, 16);
c +=3D 16;
=20
@@ -3132,15 +3130,15 @@
{=09
if (*data =3D=3D SCO_PKT) {
bt_write_lower_driver(data,len);
- hci_ctrl.hc_buf.sco_num +=3D 1;
+ hci_ctrl.hc_buf.sco_num++;
} else if (*data =3D=3D ACL_PKT) {
/* forward everything to other side */
bt_write_lower_driver(data,len);
- hci_ctrl.hc_buf.acl_num +=3D 1;
+ hci_ctrl.hc_buf.acl_num++;
} else if (*data =3D=3D CMD_PKT) {
/* convert command to event */
command_handler(data);
- hci_ctrl.hc_buf.cmd_num +=3D 1;
+ hci_ctrl.hc_buf.cmd_num++;
}
}
=20
@@ -3344,7 +3342,7 @@
cmd_buf.next_to_send =3D 0;
D_CTRL(__FUNCTION__", next_to_send WRAP\n");
} else {
- cmd_buf.next_to_send +=3D 1;
+ cmd_buf.next_to_send++;
}
} else {
/* no cmd:s in buffer */
@@ -3377,7 +3375,7 @@
cmd_buf.first_free =3D 0; /* wrap */
D_CTRL(__FUNCTION__", WRAP\n");
} else {
- cmd_buf.first_free +=3D 1;
+ cmd_buf.first_free++;
}
sti();
return 0;
@@ -3465,7 +3463,7 @@
tmp->data =3D NULL;
=20
cli();
- hci_ctrl.hc_buf.cmd_num -=3D 1;
+ hci_ctrl.hc_buf.cmd_num--;
}
sti();
=20=09
--- hci_vendor.c 2001/04/18 14:45:21 1.25
+++ hci_vendor.c 2001/04/18 15:47:13 1.26
@@ -183,7 +183,7 @@
}
bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
=20=20=20
- hci_ctrl.hc_buf.cmd_num -=3D 1;=20=20
+ hci_ctrl.hc_buf.cmd_num--;
#endif
/* We don't really know if the card accepted the change, but we did
succeed in trying to send it. --gmcnutt */
--- l2cap_con.c 2001/04/12 15:10:49 1.6
+++ l2cap_con.c 2001/04/18 15:47:13 1.7
@@ -486,7 +486,7 @@
=20=20=20
while (i < con_list.count) {=20
if (con_list.cur->hci_hdl =3D=3D hci_hdl) {
- sum +=3D 1;
+ sum++;
}
con_list.cur =3D con_list.cur->next;
i++;
--- rfcomm.c 2001/04/18 15:24:23 1.104
+++ rfcomm.c 2001/04/18 15:47:13 1.105
@@ -1314,7 +1314,7 @@
u32 con_id =3D CREATE_RFCOMM_ID(rfcomm->line, tmp_dlci);
=20
if (rfcomm->credit_flow) {
- rfcomm->dlci[tmp_dlci].remote_credits -=3D 1;
+ rfcomm->dlci[tmp_dlci].remote_credits--;
if (rfcomm->dlci[tmp_dlci].remote_credits <=3D 1) {
/* FIXME -- possible race ? */
=20=09=09=09=09=09
@@ -1408,7 +1408,7 @@
return total;
} else {
if (rfcomm->credit_flow) {
- rfcomm->dlci[dlci].local_credits -=3D 1;
+ rfcomm->dlci[dlci].local_credits--;
D_CTRL(FNC"%d credits left\n", rfcomm->dlci[dlci].local_credits);
}
=20
@@ -2401,7 +2401,7 @@
=20
tmp =3D 61;
while ((rfcomm->dlci[tmp].state =3D=3D DISCONNECTED) && (tmp > 0)) {
- tmp -=3D 1;
+ tmp--;
}
=20
return tmp;
|