diff options
author | David Robillard <d@drobilla.net> | 2017-12-26 14:56:35 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-29 10:44:36 -0500 |
commit | d1f677c22311d6eb7bc2073aa1e80921e45dbb1d (patch) | |
tree | 461e1f1e8e88fd1ab36d1cee8a675de859b81eff /src/port.c | |
parent | 105294454ba1f3f89fa0f6a679503204397d35d2 (diff) | |
download | lilv-d1f677c22311d6eb7bc2073aa1e80921e45dbb1d.tar.gz lilv-d1f677c22311d6eb7bc2073aa1e80921e45dbb1d.tar.bz2 lilv-d1f677c22311d6eb7bc2073aa1e80921e45dbb1d.zip |
Use braces everywhere
Diffstat (limited to 'src/port.c')
-rw-r--r-- | src/port.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -55,9 +55,11 @@ lilv_port_is_a(const LilvPlugin* plugin, const LilvPort* port, const LilvNode* port_class) { - LILV_FOREACH(nodes, i, port->classes) - if (lilv_node_equals(lilv_nodes_get(port->classes, i), port_class)) + LILV_FOREACH(nodes, i, port->classes) { + if (lilv_node_equals(lilv_nodes_get(port->classes, i), port_class)) { return true; + } + } return false; } @@ -163,14 +165,16 @@ lilv_port_get_name(const LilvPlugin* p, LilvNode* ret = NULL; if (results) { LilvNode* val = lilv_nodes_get_first(results); - if (lilv_node_is_string(val)) + if (lilv_node_is_string(val)) { ret = lilv_node_duplicate(val); + } lilv_nodes_free(results); } - if (!ret) + if (!ret) { LILV_WARNF("Plugin <%s> port has no (mandatory) doap:name\n", lilv_node_as_string(lilv_plugin_get_uri(p))); + } return ret; } @@ -226,8 +230,9 @@ lilv_port_get_scale_points(const LilvPlugin* p, NULL); LilvScalePoints* ret = NULL; - if (!sord_iter_end(points)) + if (!sord_iter_end(points)) { ret = lilv_scale_points_new(); + } FOREACH_MATCH(points) { const SordNode* point = sord_iter_get_node(points, SORD_OBJECT); |