aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/writer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/writer.c b/src/writer.c
index 8000e85a..b596638e 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -113,7 +113,7 @@ struct SerdWriterImpl {
SerdMessageFunc msg_func;
void* msg_handle;
WriteContext context;
- unsigned indent;
+ int indent;
char* bprefix;
size_t bprefix_len;
Sep last_sep;
@@ -382,7 +382,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);
}
}
@@ -394,7 +394,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);