diff options
author | Jonas Bonn <jonas@norrbonn.se> | 2018-10-17 15:36:10 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2018-10-17 09:56:27 -0500 |
commit | 67701b1c40cc088c54027ba06e85ed5ec2727790 (patch) | |
tree | 1d541fe75c16be2fa607d9ac54516d36cfff13ee /drivers/qmimodem/gprs.c | |
parent | ef6c257a3e78e5efbfa07971311427602553b483 (diff) | |
download | ofono-67701b1c40cc088c54027ba06e85ed5ec2727790.tar.gz |
drivers: constify vtables
The driver vtables are read-only structures. This patch declares them as
'const' allowing the compiler to (optionally) put them in the RELRO
section. RELRO pages may be marked as read-only by the linker after
the relocations have been done ensuring that they aren't inadvertently
or maliciously altered at runtime.
Diffstat (limited to 'drivers/qmimodem/gprs.c')
-rw-r--r-- | drivers/qmimodem/gprs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/qmimodem/gprs.c b/drivers/qmimodem/gprs.c index db07f310..07adbe9a 100644 --- a/drivers/qmimodem/gprs.c +++ b/drivers/qmimodem/gprs.c @@ -408,7 +408,7 @@ static void qmi_gprs_remove(struct ofono_gprs *gprs) g_free(data); } -static struct ofono_gprs_driver driver = { +static const struct ofono_gprs_driver driver = { .name = "qmimodem", .probe = qmi_gprs_probe, .remove = qmi_gprs_remove, |