Commit 71eed76d authored by Manuel Mohr's avatar Manuel Mohr
Browse files

Fixed stupid typo.

parent 65261e15
......@@ -532,9 +532,9 @@ parse_profile(const char *filename, unsigned int num_blocks)
/* The profiling output format is defined to be a sequence of integer
* values stored little endian format. */
for (i = 0; i < num_blocks; ++i) {
char bytes[4];
unsigned char bytes[4];
if ((ret = fread(bytes, 4, 1, f)) < 1)
if ((ret = fread(bytes, 1, 4, f)) < 1)
break;
result[i] = (bytes[0] << 0) | (bytes[1] << 8)
......
......@@ -29,15 +29,15 @@ void write_little_endian(unsigned *counter, unsigned len, FILE *f)
unsigned i;
for (i = 0; i < len; ++i) {
unsigned v = counter[i];
char bytes[4];
unsigned v = counter[i];
unsigned char bytes[4];
bytes[0] = ((v >> 0) & 0xff);
bytes[1] = ((v >> 8) & 0xff);
bytes[2] = ((v >> 16) & 0xff);
bytes[3] = ((v >> 24) & 0xff);
fwrite(bytes, 4, 1, f);
fwrite(bytes, 1, 4, f);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment