]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Allow p2p_get_group_num_members() to be called with NULL
authorBrian Gix <bgix@qce.qualcomm.com>
Thu, 11 Sep 2014 15:47:03 +0000 (18:47 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 2 Feb 2015 14:55:45 +0000 (16:55 +0200)
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 <jouni@qca.qualcomm.com>
src/p2p/p2p_group.c

index da8588aadb2a8745214c59a541388a21fd2774d5..e19eab7db1c9ee590f2fec8bf7f2f76336bfa03e 100644 (file)
@@ -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;
 }