diff options
Diffstat (limited to 'lib/libefi/rdwr_efi.c')
-rw-r--r-- | lib/libefi/rdwr_efi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c index f159a0224..3501c3ea3 100644 --- a/lib/libefi/rdwr_efi.c +++ b/lib/libefi/rdwr_efi.c @@ -423,7 +423,6 @@ efi_alloc_and_read(int fd, struct dk_gpt **vtoc) void *tmp; length = (int) sizeof (struct dk_gpt) + (int) sizeof (struct dk_part) * (vptr->efi_nparts - 1); - nparts = vptr->efi_nparts; if ((tmp = realloc(vptr, length)) == NULL) { /* cppcheck-suppress doubleFree */ free(vptr); @@ -565,10 +564,9 @@ int efi_rescan(int fd) { int retry = 10; - int error; /* Notify the kernel a devices partition table has been updated */ - while ((error = ioctl(fd, BLKRRPART)) != 0) { + while (ioctl(fd, BLKRRPART) != 0) { if ((--retry == 0) || (errno != EBUSY)) { (void) fprintf(stderr, "the kernel failed to rescan " "the partition table: %d\n", errno); |