summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-06-11 09:06:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-11 22:06:36 +0200
commit23ee83f42f947a7f9d725c71f638f7c9bacc93c3 (patch)
tree588e727bc0077d770dee5240e037c2951ca1082d /scripts
parent6b63e46e74705440ba3ebfa8cd2187f4d6a4f53f (diff)
downloadbarebox-23ee83f42f947a7f9d725c71f638f7c9bacc93c3.tar.gz
scripts: omap3-usb-loader: fix compiler warning
Compiling omap3-usb-loader issues the warning: warning: self-comparison always evaluates to true [-Wtautological-compare] Just remove the bogus test. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-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);