X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_nameval.c;h=d8c548a1b832e3c10b7c7ed1cc45d6e66bf29bac;hp=d7cb72aa00a6bf94ea9d275f688e6b879e14ea93;hb=7897e76da06203d6e2c20f13a1ce79e64809930a;hpb=3ecea787c3d99a5e13bf3b826dd3ad772fbad810 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));