summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-16 07:07:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-16 07:07:15 (GMT)
commit635640a32fecbb9b8a5ddf239b819c022c4b9977 (patch)
treef8fc69a2c2db411000996146536ca5cc4f54d417 /src/core
parentbf879f2562545ab7de23f9d38364b7bd4b43fb2c (diff)
Added a basic support for Mobicore truslets.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@472 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/core')
-rw-r--r--src/core/formats.c7
-rw-r--r--src/core/processors.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/core/formats.c b/src/core/formats.c
index b528e62..9ff31b2 100644
--- a/src/core/formats.c
+++ b/src/core/formats.c
@@ -178,9 +178,10 @@ static format_t *find_format_by_key(const char *key)
result = NULL;
- for (i = 0; i < _formats_definitions_count; i++)
- if (strcmp(_formats_definitions[i].key, key) == 0)
- result = &_formats_definitions[i];
+ if (key != NULL)
+ for (i = 0; i < _formats_definitions_count; i++)
+ if (strcmp(_formats_definitions[i].key, key) == 0)
+ result = &_formats_definitions[i];
return result;
diff --git a/src/core/processors.c b/src/core/processors.c
index 7489614..715cd88 100644
--- a/src/core/processors.c
+++ b/src/core/processors.c
@@ -179,9 +179,10 @@ static proc_t *find_processor_by_key(const char *key)
result = NULL;
- for (i = 0; i < _processors_definitions_count; i++)
- if (strcmp(_processors_definitions[i].key, key) == 0)
- result = &_processors_definitions[i];
+ if (key != NULL)
+ for (i = 0; i < _processors_definitions_count; i++)
+ if (strcmp(_processors_definitions[i].key, key) == 0)
+ result = &_processors_definitions[i];
return result;