tools/nxstyle.c: Don't complain about certain lowercase characters in otherwise uppercase pre-processor identifers: IPv6, IPv4, ICMPv6, IGMPv2, p as a decimal point, d signifying a divisor. It was a bad idea to let the door open a crack for there. While they improve readability, the inconsistently also causes other problems.

This commit is contained in:
Gregory Nutt
2019-03-12 14:22:52 -06:00
parent 82b276a34c
commit ba859ad302
3 changed files with 96 additions and 29 deletions
+27 -27
View File
@@ -140,43 +140,43 @@ static int bluetooth_queue_frame(FAR struct bluetooth_conn_s *conn,
}
#if CONFIG_NET_BLUETOOTH_BACKLOG > 0
/* If incrementing the count would exceed the maximum bc_backlog value, then
* delete the oldest frame from the head of the RX queue.
*/
/* If incrementing the count would exceed the maximum bc_backlog value, then
* delete the oldest frame from the head of the RX queue.
*/
if (conn->bc_backlog >= CONFIG_NET_BLUETOOTH_BACKLOG)
{
DEBUGASSERT(conn->bc_backlog == CONFIG_NET_BLUETOOTH_BACKLOG);
if (conn->bc_backlog >= CONFIG_NET_BLUETOOTH_BACKLOG)
{
DEBUGASSERT(conn->bc_backlog == CONFIG_NET_BLUETOOTH_BACKLOG);
/* Remove the container from the tail RX input queue. */
/* Remove the container from the tail RX input queue. */
container = conn->bc_rxhead;
DEBUGASSERT(container != NULL);
conn->bc_rxhead = container->bn_flink;
container->bn_flink = NULL;
container = conn->bc_rxhead;
DEBUGASSERT(container != NULL);
conn->bc_rxhead = container->bn_flink;
container->bn_flink = NULL;
/* Did the RX queue become empty? */
/* Did the RX queue become empty? */
if (conn->bc_rxhead == NULL)
{
conn->bc_rxtail = NULL;
}
if (conn->bc_rxhead == NULL)
{
conn->bc_rxtail = NULL;
}
DEBUGASSERT(container != NULL && container->bn_iob != NULL);
DEBUGASSERT(container != NULL && container->bn_iob != NULL);
/* Free both the IOB and the container */
/* Free both the IOB and the container */
iob_free(container->bn_iob);
bluetooth_container_free(container);
}
else
{
/* Increment the count of frames in the queue. */
iob_free(container->bn_iob);
bluetooth_container_free(container);
}
else
{
/* Increment the count of frames in the queue. */
conn->bc_backlog++;
}
conn->bc_backlog++;
}
DEBUGASSERT((int)conn->bc_backlog == bluetooth_count_frames(conn));
DEBUGASSERT((int)conn->bc_backlog == bluetooth_count_frames(conn));
#endif
return OK;