projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix sleep logic in background gc thread example
[yaffs2.git]
/
yaffs_nameval.c
diff --git
a/yaffs_nameval.c
b/yaffs_nameval.c
index 478248e651a996928f9157f9cfc984afa07a64f7..b85536522ebe654f977a46da88fb6526b51c12a4 100644
(file)
--- a/
yaffs_nameval.c
+++ b/
yaffs_nameval.c
@@
-1,8
+1,7
@@
/*
* YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
*
/*
* YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
*
- * Copyright (C) 2002-2011 Aleph One Ltd.
- * for Toby Churchill Ltd and Brightstar Engineering
+ * Copyright (C) 2002-2018 Aleph One Ltd.
*
* Created by Charles Manning <charles@aleph1.co.uk>
*
*
* Created by Charles Manning <charles@aleph1.co.uk>
*
@@
-28,6
+27,7
@@
#include "yaffs_nameval.h"
#include "yaffs_guts.h"
#include "yportenv.h"
#include "yaffs_nameval.h"
#include "yaffs_guts.h"
#include "yportenv.h"
+#include "yaffs_endian.h"
static int nval_find(struct yaffs_dev *dev,
const char *xb, int xb_size, const YCHAR *name,
static int nval_find(struct yaffs_dev *dev,
const char *xb, int xb_size, const YCHAR *name,
@@
-47,7
+47,7
@@
static int nval_find(struct yaffs_dev *dev,
return pos;
}
pos += size;
return pos;
}
pos += size;
- if (pos <
xb_size - sizeof(size
)) {
+ if (pos <
(int)(xb_size - sizeof(size)
)) {
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
@@
-69,7
+69,7
@@
static int nval_used(struct yaffs_dev *dev, const char *xb, int xb_size)
while (size > 0 && (size < xb_size) && (pos + size < xb_size)) {
pos += size;
while (size > 0 && (size < xb_size) && (pos + size < xb_size)) {
pos += size;
- if (pos <
xb_size - sizeof(size
)) {
+ if (pos <
(int)(xb_size - sizeof(size)
)) {
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
} else
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
} else
@@
-192,7
+192,7
@@
int nval_list(struct yaffs_dev *dev, const char *xb, int xb_size, char *buf, int
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
- while (size >
sizeof(size
) &&
+ while (size >
(int)(sizeof(size)
) &&
size <= xb_size &&
(pos + size) < xb_size &&
!filled) {
size <= xb_size &&
(pos + size) < xb_size &&
!filled) {
@@
-213,7
+213,7
@@
int nval_list(struct yaffs_dev *dev, const char *xb, int xb_size, char *buf, int
filled = 1;
}
pos += size;
filled = 1;
}
pos += size;
- if (pos <
xb_size - sizeof(size
)) {
+ if (pos <
(int)(xb_size - sizeof(size)
)) {
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
}
memcpy(&size, xb + pos, sizeof(size));
yaffs_do_endian_s32(dev, &size);
}