mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 00:50:12 +01:00
wifi: don't use :1 bitfield for gboolean type
gboolean is a typedef for "int". While older compilers might treat such bitfields as unsigned ([1]), commonly such a bitfield is signed and can only contain the values 0 and -1. We only want to use numeric 1 for TRUE, hence, creating such bitfields is wrong, or at least error prone. In fact, in this case it's a bug, because later we compare it with a regular gboolean if (priv->scanning != new_scanning) [1] https://lgtm.com/rules/1506024027114/ Fixes:e0f9677018(cherry picked from commit610ca87016) (cherry picked from commitf326feaba3)
This commit is contained in:
parent
38d8d10249
commit
7689b9b73b
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ typedef struct {
|
|||
NMSupplicantInterfaceState state;
|
||||
int disconnect_reason;
|
||||
|
||||
gboolean scanning:1;
|
||||
bool scanning:1;
|
||||
|
||||
bool scan_done_pending:1;
|
||||
bool scan_done_success:1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue