update trace output
remove redundent lines
Merge pull request #1314 from ruil2/add_trace

update trace output
Avoid warnings about comparison between signed and unsigned

There's no need for these variables to be explicitly unsigned.
This also matches the function above.
Merge pull request #1316 from mstorsjo/avoid-warnings

Avoid warnings about comparison between signed and unsigned