summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvdnav.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-10 23:56:05 +0200
committerwm4 <wm4@nowhere>2014-06-11 00:39:14 +0200
commit99f5fef0ea5671d41fb7b737fbc3e4236542a757 (patch)
treec01912d00e64a7783cb7109b3d1e2dc2390b3a7d /stream/stream_dvdnav.c
parentad4b7a8c967f9d13ceeaffff25d156d848b68445 (diff)
downloadmpv-99f5fef0ea5671d41fb7b737fbc3e4236542a757.tar.bz2
mpv-99f5fef0ea5671d41fb7b737fbc3e4236542a757.tar.xz
Add more const
While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
Diffstat (limited to 'stream/stream_dvdnav.c')
-rw-r--r--stream/stream_dvdnav.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index 20382a14e4..b2b10d5bf4 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -77,7 +77,7 @@ static const m_option_t stream_opts_fields[] = {
};
#define DNE(e) [e] = # e
-static char *mp_dvdnav_events[] = {
+static const char *const mp_dvdnav_events[] = {
DNE(DVDNAV_BLOCK_OK),
DNE(DVDNAV_NOP),
DNE(DVDNAV_STILL_FRAME),
@@ -93,7 +93,7 @@ static char *mp_dvdnav_events[] = {
DNE(DVDNAV_WAIT),
};
-static char *mp_nav_cmd_types[] = {
+static const char *const mp_nav_cmd_types[] = {
DNE(MP_NAV_CMD_NONE),
DNE(MP_NAV_CMD_ENABLE),
DNE(MP_NAV_CMD_DRAIN_OK),
@@ -103,7 +103,7 @@ static char *mp_nav_cmd_types[] = {
DNE(MP_NAV_CMD_MOUSE_POS),
};
-static char *mp_nav_event_types[] = {
+static const char *const mp_nav_event_types[] = {
DNE(MP_NAV_EVENT_NONE),
DNE(MP_NAV_EVENT_RESET),
DNE(MP_NAV_EVENT_RESET_CLUT),
@@ -737,11 +737,11 @@ static int open_s(stream_t *stream)
const stream_info_t stream_info_dvdnav = {
.name = "dvdnav",
.open = open_s,
- .protocols = (const char*[]){ "dvdnav", NULL },
+ .protocols = (const char*const[]){ "dvdnav", NULL },
.priv_size = sizeof(struct priv),
.priv_defaults = &stream_priv_dflts,
.options = stream_opts_fields,
- .url_options = (const char*[]){
+ .url_options = (const char*const[]){
"hostname=title",
"filename=device",
NULL