]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Avoid use of C++ keyword in a header file
authorJouni Malinen <j@w1.fi>
Sun, 21 Feb 2021 10:48:13 +0000 (12:48 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 21 Feb 2021 10:48:13 +0000 (12:48 +0200)
Don't use 'protected' as the name of the variable in bss.h since this
might be used in control interfaces that use C++.

Fixes: 1c77f3d3f9a3 ("Indicate whether additional ANQP elements were protected")
Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/bss.h
wpa_supplicant/ctrl_iface.c
wpa_supplicant/interworking.c

index a8bef5576fa7ea9a2bfbd84d6c1542acbd0f03dd..4078b9b9d0a43e32130cde13e582920a55906ed3 100644 (file)
@@ -33,7 +33,7 @@ struct wpa_scan_res;
 struct wpa_bss_anqp_elem {
        struct dl_list list;
        u16 infoid;
-       bool protected; /* received in a protected GAS response */
+       bool protected_response; /* received in a protected GAS response */
        struct wpabuf *payload;
 };
 
index fe338b1852b97cea9f0014b09914979d048dc658..2dce086f16cf45c688fbad07d9a91c975a3c7db6 100644 (file)
@@ -5330,7 +5330,7 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
                        os_snprintf(title, sizeof(title), "anqp[%u]",
                                    elem->infoid);
                        pos = anqp_add_hex(pos, end, title, elem->payload);
-                       if (elem->protected) {
+                       if (elem->protected_response) {
                                ret = os_snprintf(pos, end - pos,
                                                  "protected-anqp-info[%u]=1\n",
                                                  elem->infoid);
index 5db473cf73c095ebc99b64cdae45351229f3cbf0..1c82d2117ab0f63b69a892a0f543cc7ca3d14024 100644 (file)
@@ -2832,7 +2832,7 @@ int anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst, int freq,
 
 static void anqp_add_extra(struct wpa_supplicant *wpa_s,
                           struct wpa_bss_anqp *anqp, u16 info_id,
-                          const u8 *data, size_t slen, bool protected)
+                          const u8 *data, size_t slen, bool protected_response)
 {
        struct wpa_bss_anqp_elem *tmp, *elem = NULL;
 
@@ -2857,7 +2857,7 @@ static void anqp_add_extra(struct wpa_supplicant *wpa_s,
                wpabuf_free(elem->payload);
        }
 
-       elem->protected = protected;
+       elem->protected_response = protected_response;
        elem->payload = wpabuf_alloc_copy(data, slen);
        if (!elem->payload) {
                dl_list_del(&elem->list);
@@ -2900,7 +2900,7 @@ static void interworking_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
        const u8 *pos = data;
        struct wpa_bss_anqp *anqp = NULL;
        u8 type;
-       bool protected;
+       bool protected_response;
 
        if (bss)
                anqp = bss->anqp;
@@ -3001,10 +3001,11 @@ static void interworking_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
        case ANQP_VENUE_URL:
                wpa_msg(wpa_s, MSG_INFO, RX_ANQP MACSTR " Venue URL",
                        MAC2STR(sa));
-               protected = pmf_in_use(wpa_s, sa);
-               anqp_add_extra(wpa_s, anqp, info_id, pos, slen, protected);
+               protected_response = pmf_in_use(wpa_s, sa);
+               anqp_add_extra(wpa_s, anqp, info_id, pos, slen,
+                              protected_response);
 
-               if (!protected) {
+               if (!protected_response) {
                        wpa_printf(MSG_DEBUG,
                                   "ANQP: Ignore Venue URL since PMF was not enabled");
                        break;