diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/writer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/writer.c b/src/writer.c index ad9d3ccc..6e3f5d7e 100644 --- a/src/writer.c +++ b/src/writer.c @@ -112,7 +112,7 @@ struct SerdWriterImpl { SerdMessageSink msg_sink; void* msg_handle; WriteContext context; - unsigned indent; + int indent; char* bprefix; size_t bprefix_len; Sep last_sep; @@ -381,7 +381,7 @@ static void write_newline(SerdWriter* writer) { sink("\n", 1, writer); - for (unsigned i = 0; i < writer->indent; ++i) { + for (int i = 0; i < writer->indent; ++i) { sink("\t", 1, writer); } } @@ -393,7 +393,7 @@ write_sep(SerdWriter* writer, const Sep sep) // Adjust indent, but tolerate if it would become negative writer->indent = - ((rule->indent >= 0 || writer->indent >= (unsigned)-rule->indent) + ((rule->indent >= 0 || writer->indent >= -rule->indent) ? writer->indent + rule->indent : 0); |