mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 14:30:18 +01:00
platform: fix check in NMP_CLASS_IS_VALID
Maybe it was not wrong before, but this looks more correct.
This commit is contained in:
parent
2972fd55bf
commit
3799874664
1 changed files with 1 additions and 1 deletions
|
|
@ -307,7 +307,7 @@ NMP_CLASS_IS_VALID (const NMPClass *klass)
|
|||
{
|
||||
return klass >= &_nmp_classes[0]
|
||||
&& klass <= &_nmp_classes[G_N_ELEMENTS (_nmp_classes)]
|
||||
&& ((((char *) klass) - ((char *) NULL)) % (&_nmp_classes[1] - &_nmp_classes[0])) == 0;
|
||||
&& ((((char *) klass) - ((char *) _nmp_classes)) % (sizeof (_nmp_classes[0]))) == 0;
|
||||
}
|
||||
|
||||
#define NMP_REF_COUNT_STACKINIT (G_MAXINT)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue