summaryrefslogtreecommitdiff
path: root/common/ratp
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-09-12 15:45:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-09-17 09:50:41 +0200
commitfb6fd3128c11653b7990b16887b37ddab6d1bae3 (patch)
tree2de3f6571588e2edd482adeb9b0fb18fe56d0100 /common/ratp
parente42a40dcae5fbb62ae92443a27a1ad62a5493f24 (diff)
downloadbarebox-fb6fd3128c11653b7990b16887b37ddab6d1bae3.tar.gz
ratp: fix incorrect whitespaces in method calls
This is a simple coding style fix to avoid the whitespace before the open-parenthesis in method calls. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/ratp')
-rw-r--r--common/ratp/getenv.c12
-rw-r--r--common/ratp/md.c8
-rw-r--r--common/ratp/mw.c6
-rw-r--r--common/ratp/reset.c4
4 files changed, 15 insertions, 15 deletions
diff --git a/common/ratp/getenv.c b/common/ratp/getenv.c
index b409634886..fdb4b0b282 100644
--- a/common/ratp/getenv.c
+++ b/common/ratp/getenv.c
@@ -27,20 +27,20 @@
static int ratp_cmd_getenv(const struct ratp_bb *req, int req_len,
struct ratp_bb **rsp, int *rsp_len)
{
- int dlen = req_len - sizeof (struct ratp_bb);
+ int dlen = req_len - sizeof(struct ratp_bb);
char *varname;
const char *value;
- varname = xstrndup ((const char *)req->data, dlen);
- value = getenv (varname);
- free (varname);
+ varname = xstrndup((const char *)req->data, dlen);
+ value = getenv(varname);
+ free(varname);
- dlen = strlen (value);
+ dlen = strlen(value);
*rsp_len = sizeof(struct ratp_bb) + dlen;
*rsp = xzalloc(*rsp_len);
(*rsp)->type = cpu_to_be16(BB_RATP_TYPE_GETENV_RETURN);
- memcpy ((*rsp)->data, value, dlen);
+ memcpy((*rsp)->data, value, dlen);
return 0;
}
diff --git a/common/ratp/md.c b/common/ratp/md.c
index 2e5a956cb3..9ce7e99dfd 100644
--- a/common/ratp/md.c
+++ b/common/ratp/md.c
@@ -124,7 +124,7 @@ static int ratp_cmd_md(const struct ratp_bb *req, int req_len,
/* At least message header should be valid */
if (req_len < sizeof(*md_req)) {
pr_err("ignored: size mismatch (%d < %zu)\n",
- req_len, sizeof (*md_req));
+ req_len, sizeof(*md_req));
ret = -EINVAL;
goto out;
}
@@ -162,8 +162,8 @@ static int ratp_cmd_md(const struct ratp_bb *req, int req_len,
goto out;
}
- addr = be16_to_cpu (md_req->addr);
- size = be16_to_cpu (md_req->size);
+ addr = be16_to_cpu(md_req->addr);
+ size = be16_to_cpu(md_req->size);
path = xstrndup((const char *)&buffer[path_offset], path_size);
out:
@@ -193,7 +193,7 @@ out:
*rsp = (struct ratp_bb *)md_rsp;
*rsp_len = md_rsp_len;
- free (path);
+ free(path);
return ret;
}
diff --git a/common/ratp/mw.c b/common/ratp/mw.c
index 0579da3c16..55e79bbaf0 100644
--- a/common/ratp/mw.c
+++ b/common/ratp/mw.c
@@ -80,7 +80,7 @@ static int ratp_cmd_mw(const struct ratp_bb *req, int req_len,
/* At least message header should be valid */
if (req_len < sizeof(*mw_req)) {
pr_err("ignored: size mismatch (%d < %zu)\n",
- req_len, sizeof (*mw_req));
+ req_len, sizeof(*mw_req));
ret = -EINVAL;
goto out;
}
@@ -131,7 +131,7 @@ static int ratp_cmd_mw(const struct ratp_bb *req, int req_len,
goto out;
}
- addr = be16_to_cpu (mw_req->addr);
+ addr = be16_to_cpu(mw_req->addr);
path = xstrndup((const char *)&buffer[path_offset], path_size);
fd = open_and_lseek(path, O_RWSIZE_1 | O_WRONLY, addr);
@@ -164,7 +164,7 @@ out:
*rsp = (struct ratp_bb *)mw_rsp;
*rsp_len = sizeof(*mw_rsp);
- free (path);
+ free(path);
return ret;
}
diff --git a/common/ratp/reset.c b/common/ratp/reset.c
index 5439f344fc..d0229d5d6c 100644
--- a/common/ratp/reset.c
+++ b/common/ratp/reset.c
@@ -36,8 +36,8 @@ static int ratp_cmd_reset(const struct ratp_bb *req, int req_len,
{
struct ratp_bb_reset *reset_req = (struct ratp_bb_reset *)req;
- if (req_len < sizeof (*reset_req)) {
- pr_err("ignored: size mismatch (%d < %zu)\n", req_len, sizeof (*reset_req));
+ if (req_len < sizeof(*reset_req)) {
+ pr_err("ignored: size mismatch (%d < %zu)\n", req_len, sizeof(*reset_req));
return 2;
}