summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-03-23 12:59:48 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-31 13:57:50 +0200
commitdcf781f1b3d15aff5f5ff0b604bff447dee2040c (patch)
tree6b1db166f84c1d21f2e10d6d8e151eadcd72701a
parent4fb92144c456172090ca2c23744b01b4a4fbe9c7 (diff)
downloaddt-utils-dcf781f1b3d15aff5f5ff0b604bff447dee2040c.tar.gz
state: backend_bucket_direct: max_size is always given
max_size is always != 0, so if(direct->max_size) can be skipped. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--src/barebox-state/backend_bucket_direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/barebox-state/backend_bucket_direct.c b/src/barebox-state/backend_bucket_direct.c
index 9996ac2..b72e8ad 100644
--- a/src/barebox-state/backend_bucket_direct.c
+++ b/src/barebox-state/backend_bucket_direct.c
@@ -103,7 +103,7 @@ static int state_backend_bucket_direct_write(struct state_backend_storage_bucket
int ret;
struct state_backend_storage_bucket_direct_meta meta;
- if (direct->max_size && len > direct->max_size - sizeof(meta))
+ if (len > direct->max_size - sizeof(meta))
return -E2BIG;
ret = lseek(direct->fd, direct->offset, SEEK_SET);