aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-14 21:55:39 +0000
committerDavid Robillard <d@drobilla.net>2012-01-14 21:55:39 +0000
commite092ff09351eca0f4c2405d594e871f595f080fc (patch)
tree8e81e2f88f44f239778f818059ce2c9198084a60
parent62b8156a4be17341a77fc49f7e1fc7c582f4ac5b (diff)
downloadserd-e092ff09351eca0f4c2405d594e871f595f080fc.tar.gz
serd-e092ff09351eca0f4c2405d594e871f595f080fc.tar.bz2
serd-e092ff09351eca0f4c2405d594e871f595f080fc.zip
Lint.
git-svn-id: http://svn.drobilla.net/serd/trunk@283 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r--serd/serd.h2
-rw-r--r--src/env.c2
-rw-r--r--src/reader.c8
-rw-r--r--src/uri.c2
-rw-r--r--src/writer.c8
5 files changed, 11 insertions, 11 deletions
diff --git a/serd/serd.h b/serd/serd.h
index ca9cb809..ade3da9e 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -424,7 +424,7 @@ SerdNode
serd_node_new_decimal(double d, unsigned frac_digits);
/**
- Create a new node by serialising @c d into an xsd:integer string.
+ Create a new node by serialising @c i into an xsd:integer string.
*/
SERD_API
SerdNode
diff --git a/src/env.c b/src/env.c
index 89eaae6c..c01efe3d 100644
--- a/src/env.c
+++ b/src/env.c
@@ -244,7 +244,7 @@ serd_env_expand_node(const SerdEnv* env,
if (serd_env_expand(env, node, &prefix, &suffix)) {
return SERD_NODE_NULL;
}
- const size_t len = prefix.len + suffix.len; // FIXME: UTF-8?
+ const size_t len = prefix.len + suffix.len; // FIXME: UTF-8?
SerdNode ret = { NULL, len, len, 0, SERD_URI };
ret.buf = malloc(ret.n_bytes + 1);
snprintf((char*)ret.buf, ret.n_bytes + 1,
diff --git a/src/reader.c b/src/reader.c
index b66221ff..34bb1214 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -71,8 +71,8 @@ struct SerdReaderImpl {
unsigned next_id;
int err;
uint8_t* read_buf;
- int32_t read_head; ///< Offset into read_buf
- bool from_file; ///< True iff reading from @ref fd
+ int32_t read_head; ///< Offset into read_buf
+ bool from_file; ///< True iff reading from @ref fd
bool eof;
#ifdef SERD_STACK_CHECK
Ref* alloc_stack; ///< Stack of push offsets
@@ -113,7 +113,7 @@ static inline bool
page(SerdReader* reader)
{
reader->read_head = 0;
- const size_t n_read = fread(reader->read_buf, 1, SERD_PAGE_SIZE, reader->fd);
+ size_t n_read = fread(reader->read_buf, 1, SERD_PAGE_SIZE, reader->fd);
if (n_read == 0) {
reader->read_buf[0] = '\0';
reader->eof = true;
@@ -1101,7 +1101,7 @@ read_object(SerdReader* reader, ReadContext ctx)
case '4': case '5': case '6': case '7': case '8': case '9':
TRY_THROW(ret = read_number(reader, &o, &datatype));
break;
- case '\"':
+ case '\"':
TRY_THROW(ret = read_literal(reader, &o, &datatype, &lang, &flags));
break;
default:
diff --git a/src/uri.c b/src/uri.c
index 6aa7ec62..b6f912ea 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -262,7 +262,7 @@ remove_dot_segments(const uint8_t* path, size_t len, size_t* up)
default:
return begin;
}
- } // else fall through
+ } // else fall through
default:
return begin; // Finished chopping dot components
}
diff --git a/src/writer.c b/src/writer.c
index 735dcaaf..1d099c63 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -134,7 +134,7 @@ write_text(SerdWriter* writer, TextContext ctx,
}
if (in == terminator) {
- snprintf(escape, 7, "\\u%04X", terminator);
+ snprintf(escape, sizeof(escape), "\\u%04X", terminator);
sink(escape, 6, writer);
continue;
}
@@ -149,7 +149,7 @@ write_text(SerdWriter* writer, TextContext ctx,
|| (is_space(c) && ctx == WRITE_LONG_STRING)) {
sink(&in, 1, writer); // Print ASCII character
} else {
- snprintf(escape, 7, "\\u%04X", c);
+ snprintf(escape, sizeof(escape), "\\u%04X", c);
sink(escape, 6, writer); // Escape ASCII control character
}
continue;
@@ -189,10 +189,10 @@ write_text(SerdWriter* writer, TextContext ctx,
}
if (c < 0xFFFF) {
- snprintf(escape, 7, "\\u%04X", c);
+ snprintf(escape, sizeof(escape), "\\u%04X", c);
sink(escape, 6, writer);
} else {
- snprintf(escape, 11, "\\U%08X", c);
+ snprintf(escape, sizeof(escape), "\\U%08X", c);
sink(escape, 10, writer);
}
}