Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
- int fd;
- unsigned int len, off;
+ int fd, off;
+ unsigned int len;
char buf[128];
if (!(mtd = fopen("/proc/mtd", "r")))
char buf[128];
if (!(mtd = fopen("/proc/mtd", "r")))
while (fgets(buf, sizeof(buf), mtd) != NULL)
{
while (fgets(buf, sizeof(buf), mtd) != NULL)
{
- if (fscanf(mtd, "mtd%u: %x %*x %127s", &off, &len, buf) < 3 ||
+ if (fscanf(mtd, "mtd%d: %x %*x %127s", &off, &len, buf) < 3 ||
(strcmp(buf, "\"boardconfig\"") && strcmp(buf, "\"EEPROM\"") &&
strcmp(buf, "\"factory\"")))
{
(strcmp(buf, "\"boardconfig\"") && strcmp(buf, "\"EEPROM\"") &&
strcmp(buf, "\"factory\"")))
{