#if defined(CONFIG_DFU_OVER_USB) || defined(CONFIG_DFU_OVER_TFTP)
char *interface = NULL;
char *devstring = NULL;
+#if defined(CONFIG_DFU_OVER_TFTP)
+ unsigned long value = 0;
+#endif
if (argc >= 4) {
interface = argv[2];
devstring = argv[3];
}
+
+#if defined(CONFIG_DFU_OVER_TFTP)
+ if (argc == 5 || argc == 3)
+ value = simple_strtoul(argv[argc - 1], NULL, 0);
+#endif
#endif
int ret = 0;
#ifdef CONFIG_DFU_OVER_TFTP
- unsigned long addr = 0;
- if (!strcmp(argv[1], "tftp")) {
- if (argc == 5 || argc == 3)
- addr = simple_strtoul(argv[argc - 1], NULL, 0);
-
- return update_tftp(addr, interface, devstring);
- }
+ if (!strcmp(argv[1], "tftp"))
+ return update_tftp(value, interface, devstring);
#endif
#ifdef CONFIG_DFU_OVER_USB
ret = dfu_init_env_entities(interface, devstring);