all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against unsigned variables. Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
parent
caebf204c6
commit
24d71431e9
559 changed files with 2331 additions and 2328 deletions
|
@ -109,7 +109,7 @@ fcb_init(int f_area_id, struct fcb *fcb)
|
|||
}
|
||||
|
||||
align = fcb_get_align(fcb);
|
||||
if (align == 0) {
|
||||
if (align == 0U) {
|
||||
return FCB_ERR_ARGS;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ fcb_getnext_nolock(struct fcb *fcb, struct fcb_entry *loc)
|
|||
*/
|
||||
loc->fe_sector = fcb->f_oldest;
|
||||
}
|
||||
if (loc->fe_elem_off == 0) {
|
||||
if (loc->fe_elem_off == 0U) {
|
||||
/*
|
||||
* If offset is zero, we serve the first entry from the sector.
|
||||
*/
|
||||
|
|
|
@ -29,10 +29,10 @@ int fcb_get_len(u8_t *buf, u16_t *len);
|
|||
|
||||
static inline int fcb_len_in_flash(struct fcb *fcb, u16_t len)
|
||||
{
|
||||
if (fcb->f_align <= 1) {
|
||||
if (fcb->f_align <= 1U) {
|
||||
return len;
|
||||
}
|
||||
return (len + (fcb->f_align - 1)) & ~(fcb->f_align - 1);
|
||||
return (len + (fcb->f_align - 1U)) & ~(fcb->f_align - 1U);
|
||||
}
|
||||
|
||||
const struct flash_area *fcb_open_flash(const struct fcb *fcb);
|
||||
|
|
|
@ -20,7 +20,7 @@ fcb_walk(struct fcb *fcb, struct flash_sector *sector, fcb_walk_cb cb,
|
|||
int rc;
|
||||
|
||||
entry_ctx.loc.fe_sector = sector;
|
||||
entry_ctx.loc.fe_elem_off = 0;
|
||||
entry_ctx.loc.fe_elem_off = 0U;
|
||||
|
||||
rc = k_mutex_lock(&fcb->f_mtx, K_FOREVER);
|
||||
if (rc < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue