diff options
author | Martin Kurbanov | 2024-06-16 16:34:17 +0300 |
---|---|---|
committer | Heiko Schocher | 2024-07-03 08:05:19 +0200 |
commit | abae0b76f98647243d75770cdca5c1ad3302d5e8 (patch) | |
tree | be35493174c5b92428685a4eac1de53bc494c885 | |
parent | fd083246324f583d46b3863194a8968b972f7d7f (diff) |
cmd: ubi: remove redundant initializations
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
-rw-r--r-- | cmd/ubi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/ubi.c b/cmd/ubi.c index 8c1b5df0572..287da345c10 100644 --- a/cmd/ubi.c +++ b/cmd/ubi.c @@ -248,7 +248,7 @@ static int ubi_create_vol(char *volume, int64_t size, int dynamic, int vol_id, static struct ubi_volume *ubi_find_volume(char *volume) { - struct ubi_volume *vol = NULL; + struct ubi_volume *vol; int i; for (i = 0; i < ubi->vtbl_slots; i++) { @@ -355,7 +355,7 @@ static int ubi_rename_vol(char *oldname, char *newname) static int ubi_volume_continue_write(char *volume, void *buf, size_t size) { - int err = 1; + int err; struct ubi_volume *vol; vol = ubi_find_volume(volume); @@ -391,8 +391,8 @@ static int ubi_volume_continue_write(char *volume, void *buf, size_t size) int ubi_volume_begin_write(char *volume, void *buf, size_t size, size_t full_size) { - int err = 1; - int rsvd_bytes = 0; + int err; + int rsvd_bytes; struct ubi_volume *vol; vol = ubi_find_volume(volume); @@ -573,7 +573,7 @@ static int ubi_detach(void) int ubi_part(char *part_name, const char *vid_header_offset) { struct mtd_info *mtd; - int err = 0; + int err; if (ubi && ubi->mtd && !strcmp(ubi->mtd->name, part_name)) { printf("UBI partition '%s' already selected\n", part_name); @@ -604,7 +604,7 @@ int ubi_part(char *part_name, const char *vid_header_offset) static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - int64_t size = 0; + int64_t size; ulong addr = 0; bool skipcheck = false; |