summaryrefslogtreecommitdiffstats
path: root/common/state/backend_bucket_direct.c
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 18:43:53 +0200
commit0e0a13b243621f06cf1f2da257ff7b2fd81a16b1 (patch)
tree8f28760f6ebee8feb64a0b8e271c6dd547dbee78 /common/state/backend_bucket_direct.c
parenta5986ff8177e0f44b7d521a3cd824a8aa328d46f (diff)
downloadbarebox-0e0a13b243621f06cf1f2da257ff7b2fd81a16b1.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>
Diffstat (limited to 'common/state/backend_bucket_direct.c')
-rw-r--r--common/state/backend_bucket_direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/state/backend_bucket_direct.c b/common/state/backend_bucket_direct.c
index 9996ac2..b72e8ad 100644
--- a/common/state/backend_bucket_direct.c
+++ b/common/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);