Skip to content

Commit

Permalink
blocklevel: smart_write: Tidy local variable declarations
Browse files Browse the repository at this point in the history
Group them by use (and name). It's not reverse christmas tree, but it's
a bit easier on the eye.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
amboar authored and oohal committed Oct 14, 2019
1 parent aa52f94 commit a950fd7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions libflash/blocklevel.c
Expand Up @@ -506,15 +506,18 @@ int blocklevel_smart_erase(struct blocklevel_device *bl, uint64_t pos, uint64_t

int blocklevel_smart_write(struct blocklevel_device *bl, uint64_t pos, const void *buf, uint64_t len)
{
void *ecc_buf = NULL;
uint64_t ecc_start;
int ecc_protection;

void *erase_buf = NULL;
uint32_t erase_size;

const void *write_buf = buf;
uint64_t write_len;
uint64_t write_pos;
void *ecc_buf = NULL;
uint64_t ecc_start;
void *erase_buf;

int rc = 0;
int ecc_protection;

if (!buf || !bl) {
errno = EINVAL;
Expand Down

0 comments on commit a950fd7

Please sign in to comment.