[PATCH][next] rndis_wlan: Remove logically dead code

2020-05-05 Thread Gustavo A. R. Silva
caps_buf is always of size sizeof(*caps) because sizeof(caps->auth_encr_pair) * 16 is always zero. Notice that when using zero-length arrays, sizeof evaluates to zero[1]. So, the code introduced by commit 0308383f9591 ("rndis_wlan: get max_num_pmkids from device") is logically dead, hence is neve

Re: [PATCH][next] rndis_wlan: Remove logically dead code

2020-05-12 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > caps_buf is always of size sizeof(*caps) because > sizeof(caps->auth_encr_pair) * 16 is always zero. Notice > that when using zero-length arrays, sizeof evaluates to zero[1]. > > So, the code introduced by > commit 0308383f9591 ("rndis_wlan: get max_num_pmkids fro