Skip to content

Commit

Permalink
Merge pull request vmg#134 from jmendeth/no-c99-declaration
Browse files Browse the repository at this point in the history
Don't use "for (declaration"
  • Loading branch information
Devin Torres committed Oct 4, 2014
2 parents 758951b + 9b561d7 commit 1850352
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CFLAGS = -g -O3 -Wall -Wextra -Wno-unused-parameter -Isrc -std=c99
CFLAGS = -g -O3 -Wall -Wextra -Wno-unused-parameter -Isrc

ifneq ($(OS),Windows_NT)
CFLAGS += -fPIC
Expand Down
3 changes: 2 additions & 1 deletion src/autolink.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ hoedown_autolink_is_safe(const uint8_t *data, size_t size)
"http://", "https://", "/", "#", "ftp://", "mailto:"
};
static const size_t valid_uris_size[] = { 7, 8, 1, 1, 6, 7 };
size_t i;

for (size_t i = 0; i < valid_uris_count; ++i) {
for (i = 0; i < valid_uris_count; ++i) {
size_t len = valid_uris_size[i];

if (size > len &&
Expand Down
3 changes: 2 additions & 1 deletion src/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ int
hoedown_buffer_prefix(const hoedown_buffer *buf, const char *prefix)
{
assert(buf && buf->unit);
size_t i;

for (size_t i = 0; i < buf->size; ++i) {
for (i = 0; i < buf->size; ++i) {
if (prefix[i] == 0)
return 0;

Expand Down

0 comments on commit 1850352

Please sign in to comment.