From: Brian Gix Date: Thu, 11 Sep 2014 15:47:03 +0000 (+0300) Subject: P2P: Allow p2p_get_group_num_members() to be called with NULL X-Git-Tag: hostap_2_4~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea8e033e92b3e4907d9b66db767d9cae3d5380f2;p=thirdparty%2Fhostap.git P2P: Allow p2p_get_group_num_members() to be called with NULL This make it easier to use wpa_s->p2p_group without having to check whether there is a group initialized on this wpa_s instance. Signed-off-by: Jouni Malinen --- diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c index da8588aad..e19eab7db 100644 --- a/src/p2p/p2p_group.c +++ b/src/p2p/p2p_group.c @@ -981,6 +981,9 @@ u8 p2p_group_presence_req(struct p2p_group *group, unsigned int p2p_get_group_num_members(struct p2p_group *group) { + if (!group) + return 0; + return group->num_members; }