common: state: harmonize code with dt-utils
Insert a helpful size check that is an outcome of the following dt-utils
commits:

| commit a6eb535
| Author: Markus Pargmann <mpa@pengutronix.de>
| Date:   Fri May 27 13:53:40 2016 +0200
|
|     barebox-state: Import updated state code
|
|     Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

| commit 583acea
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Thu Mar 23 11:29:50 2017 +0100
|
|     state: backend-direct: Fix max_size
|
|     The max_size in the direct backend includes the meta data, so
|     substract its size when determing the max data size we can store.
|
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

| commit dcf781f
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Thu Mar 23 12:59:48 2017 +0100
|
|     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>

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent b525657 commit 5033b4f58f71e1535ab83d35dfcd8bb1b0384e22
@Ulrich Ölmann Ulrich Ölmann authored on 8 Feb 2019
Sascha Hauer committed on 11 Feb 2019
Showing 1 changed file
View
common/state/backend_bucket_direct.c