summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2014-09-10 09:13:18 +0200
committerVincent Guittot <vincent.guittot@linaro.org>2014-09-10 09:41:54 +0200
commite8d72db66ea1a1659ab60d046b2e9ef3805480ed (patch)
tree1b5b63a2b7f89c3a16d857675309b98b4c669fe4 /src
parentbc06ad9ff59ef980581cf1dc1d5c30037efa3d1e (diff)
remove useless test of type
type can't be null
Diffstat (limited to 'src')
-rw-r--r--src/rt-app_parse_config.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c
index f9e14c9..6f2d64a 100644
--- a/src/rt-app_parse_config.c
+++ b/src/rt-app_parse_config.c
@@ -217,11 +217,9 @@ parse_resource_data(char *name, struct json_object *obj, int idx,
/* resource type */
resource_to_string(0, def_type);
type = get_string_value_from(obj, "type", TRUE, def_type);
- if (type) {
- if (string_to_resource(type, &data->type) != 0) {
- log_critical(PIN2 "Invalid type of resource %s", type);
- exit(EXIT_INV_CONFIG);
- }
+ if (string_to_resource(type, &data->type) != 0) {
+ log_critical(PIN2 "Invalid type of resource %s", type);
+ exit(EXIT_INV_CONFIG);
}
switch (data->type) {