summaryrefslogtreecommitdiff
path: root/yaffs_nameval.c
diff options
context:
space:
mode:
authorCharles Manning <cdhmanning@gmail.com>2010-11-08 11:09:07 +1300
committerCharles Manning <cdhmanning@gmail.com>2010-11-08 11:09:07 +1300
commit25633e8452addb4efafd1dedde957e1b14a07fd9 (patch)
tree8764bcfae6dc709cb31e987eec61c3bf04f5daa5 /yaffs_nameval.c
parent6cb99e93f72bbb066c5abb4ab2cc0cd79f56a4f3 (diff)
yaffs Clean up conditional bracing
If a conditional has braces then all paths have braces even if they only have one statement. Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Diffstat (limited to 'yaffs_nameval.c')
-rw-r--r--yaffs_nameval.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/yaffs_nameval.c b/yaffs_nameval.c
index d7cb72a..d8c548a 100644
--- a/yaffs_nameval.c
+++ b/yaffs_nameval.c
@@ -81,8 +81,9 @@ int nval_del(char *xb, int xb_size, const YCHAR * name)
memcpy(xb + pos, xb + pos + size, xb_size - (pos + size));
memset(xb + (xb_size - size), 0, size);
return 0;
- } else
+ } else {
return -ENODATA;
+ }
}
int nval_set(char *xb, int xb_size, const YCHAR * name, const char *buf,
@@ -182,8 +183,9 @@ int nval_list(const char *xb, int xb_size, char *buf, int bsize)
buf++;
}
ncopied += (name_len + 1);
- } else
+ } else {
filled = 1;
+ }
pos += size;
if (pos < xb_size - sizeof(int))
memcpy(&size, xb + pos, sizeof(int));