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/speedupmodem | |
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/speedupmodem')
-rw-r--r-- | drivers/speedupmodem/ussd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/speedupmodem/ussd.c b/drivers/speedupmodem/ussd.c index c27a7ffa..315a0eac 100644 --- a/drivers/speedupmodem/ussd.c +++ b/drivers/speedupmodem/ussd.c @@ -204,7 +204,7 @@ static void speedup_ussd_remove(struct ofono_ussd *ussd) g_free(data); } -static struct ofono_ussd_driver driver = { +static const struct ofono_ussd_driver driver = { .name = "speedupmodem", .probe = speedup_ussd_probe, .remove = speedup_ussd_remove, |