summaryrefslogtreecommitdiff
path: root/ponymap.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-09-26 21:10:52 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-09-26 21:32:16 +0200
commit4810b37b2976580ae9f1f84d41986531ba2315da (patch)
tree10252bcaffa6831c1577deed51fc858d6932907b /ponymap.c
parent3ecf06ba468792c54bb8fd4e0804430ba0ab9cfd (diff)
downloadponymap-4810b37b2976580ae9f1f84d41986531ba2315da.tar.gz
ponymap-4810b37b2976580ae9f1f84d41986531ba2315da.tar.xz
ponymap-4810b37b2976580ae9f1f84d41986531ba2315da.zip
-Wpedantic/scan-build stuff
Diffstat (limited to 'ponymap.c')
-rw-r--r--ponymap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ponymap.c b/ponymap.c
index 6ebf10e..559bfb8 100644
--- a/ponymap.c
+++ b/ponymap.c
@@ -1245,8 +1245,7 @@ node_print_tree_level (struct node *self, struct node_print_data *data)
struct str indent;
str_init (&indent);
- struct node_print_level *iter = data->head;
- for (iter = data->head; iter; iter = iter->next)
+ for (struct node_print_level *iter = data->head; iter; iter = iter->next)
{
bool started = iter->started;
iter->started = true;
@@ -1257,9 +1256,10 @@ node_print_tree_level (struct node *self, struct node_print_data *data)
str_free (&indent);
char *escaped = node_escape_text (self->text);
- self->bold
- ? print_bold (stdout, escaped)
- : fputs (escaped, stdout);
+ if (self->bold)
+ print_bold (stdout, escaped);
+ else
+ fputs (escaped, stdout);
fputc ('\n', stdout);
free (escaped);