From 8570a32e92e10f6a7f08ea4409b03b54bd992d5d Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 25 Jan 2008 14:33:58 +0200 Subject: ubi-tests: stylistic amendments Signed-off-by: Artem Bityutskiy --- tests/ubi-tests/common.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/ubi-tests/common.c') diff --git a/tests/ubi-tests/common.c b/tests/ubi-tests/common.c index 1343ec1..a5064fb 100644 --- a/tests/ubi-tests/common.c +++ b/tests/ubi-tests/common.c @@ -166,11 +166,11 @@ int __check_volume(libubi_t libubi, struct ubi_dev_info *dev_info, req->vol_type, vol_info.type); return -1; } - if (strlen(req->name) != strlen(&vol_info.name[0]) || - strcmp(req->name, &vol_info.name[0]) != 0) { + if (strlen(req->name) != strlen(vol_info.name) || + strcmp(req->name, vol_info.name) != 0) { __err_msg(test, func, line, "bad name: requested \"%s\", got \"%s\"", - req->name, &vol_info.name[0]); + req->name, vol_info.name); return -1; } if (vol_info.corrupted) { @@ -239,8 +239,8 @@ int __check_vol_patt(libubi_t libubi, struct ubi_dev_info *dev_info, while (bytes < vol_info.data_bytes) { int i; - memset(&buf[0], ~byte, 512); - ret = read(fd, &buf[0], 512); + memset(buf, ~byte, 512); + ret = read(fd, buf, 512); if (ret == -1) { __failed(test, func, line, "read"); __err_msg(test, func, line, "bytes = %lld, ret = %d", @@ -307,10 +307,10 @@ int __update_vol_patt(libubi_t libubi, const char *test, const char *func, goto close; } - memset(&buf[0], byte, 512); + memset(buf, byte, 512); while (written != bytes) { - ret = write(fd, &buf[0], 512); + ret = write(fd, buf, 512); if (ret == -1) { __failed(test, func, line, "write"); __err_msg(test, func, line, "written = %lld, ret = %d", -- cgit v1.2.3