aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-10-10 00:14:03 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-10-10 00:14:03 +0200
commit21dcdf11cf8f05d94b17cd0b5cce058b45ee3923 (patch)
tree3e5b48c90d95c6cda91ab9b6f1e89d298bd7be2d /src/systemcmds
parent1ca718b57fe0af737b0d2fb4e903162e5bb56852 (diff)
downloadpx4-firmware-21dcdf11cf8f05d94b17cd0b5cce058b45ee3923.tar.gz
px4-firmware-21dcdf11cf8f05d94b17cd0b5cce058b45ee3923.tar.bz2
px4-firmware-21dcdf11cf8f05d94b17cd0b5cce058b45ee3923.zip
WIP, typo fix
Diffstat (limited to 'src/systemcmds')
-rw-r--r--src/systemcmds/tests/tests_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemcmds/tests/tests_file.c b/src/systemcmds/tests/tests_file.c
index e9db4716d..58eeb6fdf 100644
--- a/src/systemcmds/tests/tests_file.c
+++ b/src/systemcmds/tests/tests_file.c
@@ -82,7 +82,7 @@ test_file(int argc, char *argv[])
start = hrt_absolute_time();
for (unsigned i = 0; i < iterations; i++) {
perf_begin(wperf);
- int wret = write(fd, write_buf + (i % 64), 512);
+ int wret = write(fd, write_buf + 1/*+ (i % 64)*/, 512);
if (wret != 512) {
warn("WRITE ERROR!");
@@ -109,7 +109,7 @@ test_file(int argc, char *argv[])
/* read back data for validation */
for (unsigned i = 0; i < iterations; i++) {
- int rret = read(fd, read_buf, 512);
+ int rret = read(fd, read_buf + 0, 512);
if (rret != 512) {
warn("READ ERROR!");
@@ -120,7 +120,7 @@ test_file(int argc, char *argv[])
bool compare_ok = true;
for (int j = 0; j < 512; j++) {
- if (read_buf[j] != write_buf[j + 1/*+ (i % 64)*/]) {
+ if ((read_buf + 0)[j] != write_buf[j + 1/*+ (i % 64)*/]) {
warnx("COMPARISON ERROR: byte %d, align shift: %d", j, (i % 64));
compare_ok = false;
break;