mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-12-11 17:26:40 +08:00
minor: fixed coding style in igmp.c
This commit is contained in:
parent
ba71ac78d9
commit
3dd0977635
@ -345,9 +345,10 @@ igmp_remove_group(struct igmp_group *group)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Group not found in the global igmp_group_list */
|
/* Group not found in the global igmp_group_list */
|
||||||
if (tmpGroup == NULL)
|
if (tmpGroup == NULL) {
|
||||||
err = ERR_ARG;
|
err = ERR_ARG;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* free group */
|
/* free group */
|
||||||
memp_free(MEMP_IGMP_GROUP, group);
|
memp_free(MEMP_IGMP_GROUP, group);
|
||||||
|
|
||||||
@ -406,7 +407,7 @@ igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest)
|
|||||||
|
|
||||||
/* NOW ACT ON THE INCOMING MESSAGE TYPE... */
|
/* NOW ACT ON THE INCOMING MESSAGE TYPE... */
|
||||||
switch (igmp->igmp_msgtype) {
|
switch (igmp->igmp_msgtype) {
|
||||||
case IGMP_MEMB_QUERY: {
|
case IGMP_MEMB_QUERY:
|
||||||
/* IGMP_MEMB_QUERY to the "all systems" address ? */
|
/* IGMP_MEMB_QUERY to the "all systems" address ? */
|
||||||
if ((ip4_addr_cmp(dest, &allsystems)) && ip4_addr_isany(&igmp->igmp_group_address)) {
|
if ((ip4_addr_cmp(dest, &allsystems)) && ip4_addr_isany(&igmp->igmp_group_address)) {
|
||||||
/* THIS IS THE GENERAL QUERY */
|
/* THIS IS THE GENERAL QUERY */
|
||||||
@ -454,8 +455,7 @@ igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
case IGMP_V2_MEMB_REPORT:
|
||||||
case IGMP_V2_MEMB_REPORT: {
|
|
||||||
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_V2_MEMB_REPORT\n"));
|
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_V2_MEMB_REPORT\n"));
|
||||||
IGMP_STATS_INC(igmp.rx_report);
|
IGMP_STATS_INC(igmp.rx_report);
|
||||||
if (group->group_state == IGMP_GROUP_DELAYING_MEMBER) {
|
if (group->group_state == IGMP_GROUP_DELAYING_MEMBER) {
|
||||||
@ -465,14 +465,12 @@ igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest)
|
|||||||
group->last_reporter_flag = 0;
|
group->last_reporter_flag = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
default:
|
||||||
default: {
|
|
||||||
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: unexpected msg %d in state %d on group %p on if %p\n",
|
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: unexpected msg %d in state %d on group %p on if %p\n",
|
||||||
igmp->igmp_msgtype, group->group_state, (void*)&group, (void*)group->netif));
|
igmp->igmp_msgtype, group->group_state, (void*)&group, (void*)group->netif));
|
||||||
IGMP_STATS_INC(igmp.proterr);
|
IGMP_STATS_INC(igmp.proterr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
return;
|
return;
|
||||||
@ -521,7 +519,8 @@ igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr)
|
|||||||
* @param groupaddr the ip address of the group which to join
|
* @param groupaddr the ip address of the group which to join
|
||||||
* @return ERR_OK if group was joined on the netif, an err_t otherwise
|
* @return ERR_OK if group was joined on the netif, an err_t otherwise
|
||||||
*/
|
*/
|
||||||
err_t igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr)
|
err_t
|
||||||
|
igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr)
|
||||||
{
|
{
|
||||||
struct igmp_group *group;
|
struct igmp_group *group;
|
||||||
|
|
||||||
@ -613,7 +612,8 @@ igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr)
|
|||||||
* @param groupaddr the ip address of the group which to leave
|
* @param groupaddr the ip address of the group which to leave
|
||||||
* @return ERR_OK if group was left on the netif, an err_t otherwise
|
* @return ERR_OK if group was left on the netif, an err_t otherwise
|
||||||
*/
|
*/
|
||||||
err_t igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr)
|
err_t
|
||||||
|
igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr)
|
||||||
{
|
{
|
||||||
struct igmp_group *group;
|
struct igmp_group *group;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user