X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_nameval.c;h=d8c548a1b832e3c10b7c7ed1cc45d6e66bf29bac;hp=d7cb72aa00a6bf94ea9d275f688e6b879e14ea93;hb=25633e8452addb4efafd1dedde957e1b14a07fd9;hpb=6cb99e93f72bbb066c5abb4ab2cc0cd79f56a4f3 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));