diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-07-06 14:35:33 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-07-06 14:48:42 +0200 |
commit | d1a98d689297e520f0289915f594738f8ab5d670 (patch) | |
tree | 56283983d4e463d4e19d9ac71564f0ed9b3d1403 | |
parent | 7ab7dc94873984fdb026dc3e16ce52d31b227623 (diff) |
device: fix order of params in nm_match_spec_device prototype
The following commit:
b869d9cc0 device: add spec "driver:" to match devices
added two parameters ("driver" and "driver_version") to the
nm_match_spec_device() function.
However, the definition of the function and its declaration are not
consistent.
The prototype shows:
nm_match_spec_device (const GSList *specs,
const char *interface_name,
const char *driver,
const char *driver_version,
const char *device_type,
But the definition shows:
nm_match_spec_device (const GSList *specs,
const char *interface_name,
const char *device_type,
const char *driver,
const char *driver_version,
Since all parameters are pointers to const char, the type checking
succeeds at compile time.
All currently existing invocations of the function are correct and pass
the arguments in the order described in the definition/implementation.
This patch only changes the prototype so that potential future
invocations don't end up buggy.
Fixes: b869d9cc0dda4fe5300f5ec5b5a090199ecd4e3e
-rw-r--r-- | src/nm-core-utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-core-utils.h b/src/nm-core-utils.h index 085304008c..38a0fff541 100644 --- a/src/nm-core-utils.h +++ b/src/nm-core-utils.h @@ -204,9 +204,9 @@ typedef enum { NMMatchSpecMatchType nm_match_spec_device (const GSList *specs, const char *interface_name, + const char *device_type, const char *driver, const char *driver_version, - const char *device_type, const char *hwaddr, const char *s390_subchannels); NMMatchSpecMatchType nm_match_spec_config (const GSList *specs, |