Skip to content

Commit

Permalink
Merge pull request iovisor#996 from markdrayton/fix-find-buildid
Browse files Browse the repository at this point in the history
Fix "for loop initial declarations only in C99" compile error
  • Loading branch information
4ast committed Feb 21, 2017
2 parents b0a982b + f498e59 commit 02884a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cc/bcc_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ static int find_buildid(Elf *e, char *buildid) {

char *buf = (char *)data->d_buf + 16;
size_t length = data->d_size - 16;
for (size_t i = 0; i < length; ++i) {
size_t i = 0;
for (i = 0; i < length; ++i) {
sprintf(buildid + (i * 2), "%02hhx", buf[i]);
}

Expand Down

0 comments on commit 02884a0

Please sign in to comment.