From 0bd997bff81387d188a3368dea6b27c9c39d3deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 19 Dec 2007 15:11:28 +0100 Subject: 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. --- src/input/mms.c | 4 ++-- src/input/mmsh.c | 4 ++-- 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; } -- cgit v1.2.3