aboutsummaryrefslogtreecommitdiffstats
path: root/package/mtd
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-09-25 18:24:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-09-25 18:24:53 +0000
commit41ae863d7f16e11f87fb0800f59e73838f14b571 (patch)
tree1de28dca14992e86ae4d0bfe54c6ca335907fed2 /package/mtd
parent4a62d68975c7e681444375d453b52aa3914fa19d (diff)
downloadupstream-41ae863d7f16e11f87fb0800f59e73838f14b571.tar.gz
upstream-41ae863d7f16e11f87fb0800f59e73838f14b571.tar.bz2
upstream-41ae863d7f16e11f87fb0800f59e73838f14b571.zip
fix some warnings
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12707 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mtd')
-rw-r--r--package/mtd/src/jffs2.c2
-rw-r--r--package/mtd/src/mtd.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/package/mtd/src/jffs2.c b/package/mtd/src/jffs2.c
index 5654f93e07..c683b51d18 100644
--- a/package/mtd/src/jffs2.c
+++ b/package/mtd/src/jffs2.c
@@ -247,7 +247,7 @@ void mtd_parse_jffs2data(const char *buf, const char *dir)
struct jffs2_raw_dirent *de = (struct jffs2_raw_dirent *) node;
/* is this the right directory name and is it a subdirectory of / */
- if (*dir && (de->pino == 1) && !strncmp(de->name, dir, de->nsize))
+ if (*dir && (de->pino == 1) && !strncmp((char *) de->name, dir, de->nsize))
target_ino = de->ino;
/* store the last inode and version numbers for adding extra files */
diff --git a/package/mtd/src/mtd.c b/package/mtd/src/mtd.c
index 6e430f4b5f..b180aecfb9 100644
--- a/package/mtd/src/mtd.c
+++ b/package/mtd/src/mtd.c
@@ -138,9 +138,11 @@ int mtd_write_buffer(int fd, const char *buf, int offset, int length)
static int
image_check(int imagefd, const char *mtd)
{
+ int ret = 0;
#ifdef target_brcm
- return trx_check(imagefd, mtd, buf, &buflen);
+ ret = trx_check(imagefd, mtd, buf, &buflen);
#endif
+ return ret;
}
static int mtd_check(const char *mtd)