summaryrefslogtreecommitdiffstats
path: root/scripts/omap3-usb-loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/omap3-usb-loader.c')
-rw-r--r--scripts/omap3-usb-loader.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/omap3-usb-loader.c b/scripts/omap3-usb-loader.c
index edf6043edf..3ba9af0652 100644
--- a/scripts/omap3-usb-loader.c
+++ b/scripts/omap3-usb-loader.c
@@ -354,12 +354,10 @@ static unsigned char *read_file(char *path, size_t *readamt)
size_t iter = 0;
while (1) {
- if (iter >= iter) {
- allocsize += 1024;
- data = realloc(data, allocsize);
- if (!data)
- return NULL;
- }
+ allocsize += 1024;
+ data = realloc(data, allocsize);
+ if (!data)
+ return NULL;
size_t readsize = allocsize - iter;
size_t ret = fread(data + iter, sizeof (unsigned char), readsize, fp);