diff options
author | Thomas Haller <thaller@redhat.com> | 2017-03-09 15:12:05 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-03-09 15:12:43 +0100 |
commit | 379987466409e99abd01eef8f281c3e1e39dc67d (patch) | |
tree | af5efa0a450af50cf1c1a32b76111c8442639d15 | |
parent | 2972fd55bfbd893fb2a7a0493d6ecbdbf8a4aaa6 (diff) | |
download | NetworkManager-379987466409e99abd01eef8f281c3e1e39dc67d.tar.gz |
platform: fix check in NMP_CLASS_IS_VALID
Maybe it was not wrong before, but this looks more
correct.
-rw-r--r-- | src/platform/nmp-object.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h index dd11b98586..883fecf3a2 100644 --- a/src/platform/nmp-object.h +++ b/src/platform/nmp-object.h @@ -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) |