summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-19 15:11:28 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-19 15:11:28 +0100
commit0bd997bff81387d188a3368dea6b27c9c39d3deb (patch)
tree3042ed8985f80287d55c105c8d449751a822586c
parent441dab939754324fa760627c133dee1b0125c213 (diff)
downloadxine-lib-0bd997bff81387d188a3368dea6b27c9c39d3deb.tar.gz
xine-lib-0bd997bff81387d188a3368dea6b27c9c39d3deb.tar.bz2
Transform mmst_proto_s and mmsh_proto_s into arrays of arrays, padded at 8 bytes.
The size occupied will be smaller in 64-bit systems, and almost the same in 32-bit systems, but the access should be faster.
-rw-r--r--src/input/mms.c4
-rw-r--r--src/input/mmsh.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/input/mms.c b/src/input/mms.c
index f11a89cf3..7b8e18bab 100644
--- a/src/input/mms.c
+++ b/src/input/mms.c
@@ -532,7 +532,7 @@ static int interp_asf_header (mms_t *this) {
return 1;
}
-static const char *const mmst_proto_s[] = { "mms", "mmst", NULL };
+static const char mmst_proto_s[][8] = { "mms", "mmst", "" };
static int mmst_valid_proto (char *proto) {
int i = 0;
@@ -542,7 +542,7 @@ static int mmst_valid_proto (char *proto) {
if (!proto)
return 0;
- while(mmst_proto_s[i]) {
+ while(*(mmst_proto_s[i])) {
if (!strcasecmp(proto, mmst_proto_s[i])) {
return 1;
}
diff --git a/src/input/mmsh.c b/src/input/mmsh.c
index ae1c62bc1..13b51d21e 100644
--- a/src/input/mmsh.c
+++ b/src/input/mmsh.c
@@ -447,7 +447,7 @@ static int interp_header (mmsh_t *this) {
return 1;
}
-static const char *const mmsh_proto_s[] = { "mms", "mmsh", NULL };
+static const char mmsh_proto_s[][8] = { "mms", "mmsh", "" };
static int mmsh_valid_proto (char *proto) {
int i = 0;
@@ -457,7 +457,7 @@ static int mmsh_valid_proto (char *proto) {
if (!proto)
return 0;
- while(mmsh_proto_s[i]) {
+ while(*(mmsh_proto_s[i])) {
if (!strcasecmp(proto, mmsh_proto_s[i])) {
return 1;
}