summaryrefslogtreecommitdiff
path: root/seq
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 13:10:02 +0100
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 13:10:02 +0100
commit6232f1c96cde1fee247e95cd97235c48cc7b168d (patch)
treee21322f006201192768c2a01b4f7d7479e6c9d3a /seq
parentca1ea1e90484bf8cd2a7ef78f29e4f02a457d584 (diff)
downloadalsa-utils-6232f1c96cde1fee247e95cd97235c48cc7b168d.tar.gz
Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion, or from .data.rel to .data.rel.ro. The .rodata section is mapped directly from the on-disk file, which is always a save, while .data.rel.ro is mapped directly when using prelink, which is a save in a lot of cases. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Diffstat (limited to 'seq')
-rw-r--r--seq/aconnect/aconnect.c2
-rw-r--r--seq/aplaymidi/aplaymidi.c6
-rw-r--r--seq/aplaymidi/arecordmidi.c4
-rw-r--r--seq/aseqdump/aseqdump.c4
-rw-r--r--seq/aseqnet/aseqnet.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c
index bab501a..1a50666 100644
--- a/seq/aconnect/aconnect.c
+++ b/seq/aconnect/aconnect.c
@@ -255,7 +255,7 @@ enum {
SUBSCRIBE, UNSUBSCRIBE, LIST, REMOVE_ALL
};
-static struct option long_option[] = {
+static const struct option long_option[] = {
{"disconnect", 0, NULL, 'd'},
{"input", 0, NULL, 'i'},
{"output", 0, NULL, 'o'},
diff --git a/seq/aplaymidi/aplaymidi.c b/seq/aplaymidi/aplaymidi.c
index b9377e5..5ed7bab 100644
--- a/seq/aplaymidi/aplaymidi.c
+++ b/seq/aplaymidi/aplaymidi.c
@@ -328,7 +328,7 @@ static int read_track(struct track *track, int track_end)
switch (cmd >> 4) {
/* maps SMF events to ALSA sequencer events */
- static unsigned char cmd_type[] = {
+ static const unsigned char cmd_type[] = {
[0x8] = SND_SEQ_EVENT_NOTEOFF,
[0x9] = SND_SEQ_EVENT_NOTEON,
[0xa] = SND_SEQ_EVENT_KEYPRESS,
@@ -857,8 +857,8 @@ static void version(void)
int main(int argc, char *argv[])
{
- static char short_options[] = "hVlp:d:";
- static struct option long_options[] = {
+ static const char short_options[] = "hVlp:d:";
+ static const struct option long_options[] = {
{"help", 0, NULL, 'h'},
{"version", 0, NULL, 'V'},
{"list", 0, NULL, 'l'},
diff --git a/seq/aplaymidi/arecordmidi.c b/seq/aplaymidi/arecordmidi.c
index 558fd6d..9628086 100644
--- a/seq/aplaymidi/arecordmidi.c
+++ b/seq/aplaymidi/arecordmidi.c
@@ -706,8 +706,8 @@ static void sighandler(int sig)
int main(int argc, char *argv[])
{
- static char short_options[] = "hVlp:b:f:t:sdm:i:";
- static struct option long_options[] = {
+ static const char short_options[] = "hVlp:b:f:t:sdm:i:";
+ static const struct option long_options[] = {
{"help", 0, NULL, 'h'},
{"version", 0, NULL, 'V'},
{"list", 0, NULL, 'l'},
diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c
index 5122bbb..24c5d21 100644
--- a/seq/aseqdump/aseqdump.c
+++ b/seq/aseqdump/aseqdump.c
@@ -351,8 +351,8 @@ static void sighandler(int sig)
int main(int argc, char *argv[])
{
- static char short_options[] = "hVlp:";
- static struct option long_options[] = {
+ static const char short_options[] = "hVlp:";
+ static const struct option long_options[] = {
{"help", 0, NULL, 'h'},
{"version", 0, NULL, 'V'},
{"list", 0, NULL, 'l'},
diff --git a/seq/aseqnet/aseqnet.c b/seq/aseqnet/aseqnet.c
index ccf33e6..e071ad9 100644
--- a/seq/aseqnet/aseqnet.c
+++ b/seq/aseqnet/aseqnet.c
@@ -83,7 +83,7 @@ static int info = 0;
* main routine
*/
-static struct option long_option[] = {
+static const struct option long_option[] = {
{"port", 1, NULL, 'p'},
{"source", 1, NULL, 's'},
{"dest", 1, NULL, 'd'},