summaryrefslogtreecommitdiffstats
path: root/core/taxonomy.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-04 07:49:56 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-04 08:05:09 -0700
commitb19db6afb56947ae04a2a00ab535feda541f328e (patch)
treed6e8d035f7bad8b5746036e93db57bb354259a39 /core/taxonomy.c
parent8f4a047cf08d3a8a7066b1c5960cf8ddd3773917 (diff)
downloadsubsurface-b19db6afb56947ae04a2a00ab535feda541f328e.tar.gz
White space and clarifying braces
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/taxonomy.c')
-rw-r--r--core/taxonomy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/taxonomy.c b/core/taxonomy.c
index 5f032cd46..a6d829fa1 100644
--- a/core/taxonomy.c
+++ b/core/taxonomy.c
@@ -51,20 +51,22 @@ int taxonomy_index_for_category(struct taxonomy_data *t, enum taxonomy_category
const char *taxonomy_get_country(struct taxonomy_data *t)
{
- for (int i = 0; i < t->nr; i++)
+ for (int i = 0; i < t->nr; i++) {
if (t->category[i].category == TC_COUNTRY)
return t->category[i].value;
+ }
return NULL;
}
void taxonomy_set_country(struct taxonomy_data *t, const char *country, enum taxonomy_origin origin)
{
int idx = -1;
- for (int i = 0; i < t->nr; i++)
+ for (int i = 0; i < t->nr; i++) {
if (t->category[i].category == TC_COUNTRY) {
idx = i;
break;
}
+ }
if (idx == -1) {
if (t->nr == TC_NR_CATEGORIES - 1) {
// can't add another one